phcthemes_web_theme_pack 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '094e26f68f4b3207de7297ec814a9829fc85dc09939c12bf2befdb98ace56389'
4
- data.tar.gz: 213e42f0205b4ac840c3745da52bd746954c4fbf70eef41e25ead83e66996f5e
3
+ metadata.gz: fbc0ba6eb79d1683bd66b1444508c7b1765e8c3e6d24f40672b2e5c8437edb0d
4
+ data.tar.gz: f8cd81773ceeb96ca485a2e43b95fb53cbbc0ee26e8d18b28f7d03fd70c5e4ef
5
5
  SHA512:
6
- metadata.gz: ed1524c90e034d0440949f994e737fdbae1193cc15d56fd79b10b0b1b8058974ab2162cfbfbb6c7487d9316acb65c02a9287edede0639c48795a961d694dece5
7
- data.tar.gz: 91e6be464fa8aca77da2127a7d1a5b5cd8e61a76b33fd191967075997eeaedc8bd0fc979eb420ad3c1653ce3ae8f4b48bf5c02c1c0d537228dc2df0daf2352fc
6
+ metadata.gz: 60aa7a473b50e88001f491c67208ee1c1cf74c766f954822ad87ceee749af3f30f8bd710be5d7006faef42696c38b4c292bf93b6267ba667cd4aec1d06dbaf1a
7
+ data.tar.gz: c89505da38fcc40b609c9fecf74377c9d87eb673ed3d3d94b37c847b9238aabef09d33e636a05a5947fb96d2000a61d0144fcd0a939cdfa2486f140ce952ea86
@@ -1,3 +1,4 @@
1
1
  //= require rails-ujs
2
2
  //= require activestorage
3
3
  //= require themes/smarty/theme/core.js
4
+ //= require themes/smarty/theme/vendor_bundle.js
@@ -1,3 +1,4 @@
1
+ /*! Core v3.0.6 */
1
2
  /*!
2
3
  * jQuery JavaScript Library v3.4.1
3
4
  * https://jquery.com/
@@ -13280,7 +13281,7 @@ return jQuery;
13280
13281
 
13281
13282
  var _t = jQuery(this);
13282
13283
 
13283
- jQuery('.nav-item>.nav-link.scroll-to, .nav-item>.nav-link.js-ajax, .dropdown-item>.dropdown-link.js-ajax', _t).on('click',function() {
13284
+ jQuery('.scroll-to, .js-ajax', _t).on('click',function() {
13284
13285
 
13285
13286
  if($.SOW.globals.is_mobile === true)
13286
13287
  _t.collapse('hide');
@@ -14803,6 +14804,10 @@ return jQuery;
14803
14804
 
14804
14805
  }
14805
14806
 
14807
+
14808
+ // Close any open dropdown!
14809
+ $('.dropdown-menu.show').dropdown('hide').parent().find('[data-toggle="dropdown"]').attr('aria-expanded', 'false').removeClass('active');
14810
+
14806
14811
  },
14807
14812
 
14808
14813
  error: function(XMLHttpRequest, textStatus, errorThrown) {
@@ -15443,7 +15448,8 @@ return jQuery;
15443
15448
 
15444
15449
  if(e.state) {
15445
15450
 
15446
- document.title = e.state.pageTitle; // update title from history
15451
+ if(typeof e.state.pageTitle !== 'undefined')
15452
+ document.title = e.state.pageTitle; // update title from history
15447
15453
 
15448
15454
  var _obj = JSON.parse(e.state.html);
15449
15455
 
@@ -17835,6 +17841,10 @@ return jQuery;
17835
17841
  _confirmType = _t.data('ajax-confirm-type') || confirm_type, // confirmation type: danger|warning|etc. empty for normal/clean
17836
17842
  _confirmMode = _t.data('ajax-confirm-mode') || confirm_mode, // confirmation type: regular|ajax
17837
17843
  _confirmMethod = _t.data('ajax-confirm-method') || confirm_method, // confirmation method: GET|POST
17844
+
17845
+ _confirmSuccessEl = _t.data('ajax-confirm-success-target') || '', // element
17846
+ _confirmSuccessElAction = _t.data('ajax-confirm-success-target-action') || '', // action: remove|addClass|removeClass|toggleClass
17847
+ _confirmSuccessElClass = _t.data('ajax-confirm-success-target-class') || '', // class to remove or add
17838
17848
 
17839
17849
  _confirmTitle = _t.data('ajax-confirm-title') || confirm_title, // modal title
17840
17850
  _confirmBody = _t.data('ajax-confirm-body') || confirm_body, // message | question
@@ -17954,6 +17964,24 @@ return jQuery;
17954
17964
  $.SOW.helper.executeFunctionByName(_confirmCallback, window, _t, data);
17955
17965
 
17956
17966
 
17967
+ // Success: actions
17968
+ if(_confirmSuccessEl != '') {
17969
+
17970
+ if(_confirmSuccessElAction == 'remove')
17971
+ jQuery(_confirmSuccessEl).remove();
17972
+
17973
+ else if(_confirmSuccessElAction == 'addClass')
17974
+ jQuery(_confirmSuccessEl).addClass(_confirmSuccessElClass);
17975
+
17976
+ else if(_confirmSuccessElAction == 'removeClass')
17977
+ jQuery(_confirmSuccessEl).removeClass(_confirmSuccessElClass);
17978
+
17979
+ else if(_confirmSuccessElAction == 'toggleClass')
17980
+ jQuery(_confirmSuccessEl).toggleClass(_confirmSuccessElClass);
17981
+
17982
+ }
17983
+
17984
+
17957
17985
  }
17958
17986
  });
17959
17987
 
@@ -19762,35 +19790,35 @@ return jQuery;
19762
19790
  if(t_pos == 'top-right') {
19763
19791
  var _posClass = 'fixed-top right-0';
19764
19792
  var _wrapperID = 'wrapper_toast_tr';
19765
- var t_spacing = 'mt--15 mr--30';
19793
+ var t_spacing = 'mt-3 mr-4';
19766
19794
  }
19767
19795
 
19768
19796
  // bottom right
19769
19797
  else if(t_pos == 'bottom-right') {
19770
19798
  var _posClass = 'fixed-bottom right-0';
19771
19799
  var _wrapperID = 'wrapper_toast_br';
19772
- var t_spacing = 'mb--15 mr--30';
19800
+ var t_spacing = 'mb-3 mr-4';
19773
19801
  }
19774
19802
 
19775
19803
  // top left
19776
19804
  else if(t_pos == 'top-left') {
19777
19805
  var _posClass = 'fixed-top left-0';
19778
19806
  var _wrapperID = 'wrapper_toast_tl';
19779
- var t_spacing = 'mt--15 ml--30';
19807
+ var t_spacing = 'mt-3 ml-4';
19780
19808
  }
19781
19809
 
19782
19810
  // bottom left
19783
19811
  else if(t_pos == 'bottom-left') {
19784
19812
  var _posClass = 'fixed-bottom left-0';
19785
19813
  var _wrapperID = 'wrapper_toast_bl';
19786
- var t_spacing = 'mb--15 ml--30';
19814
+ var t_spacing = 'mb-3 ml-4';
19787
19815
  }
19788
19816
 
19789
19817
  // top center
19790
19818
  if(t_pos == 'top-center') {
19791
19819
  var _posClass = 'fixed-top mx-auto';
19792
19820
  var _wrapperID = 'wrapper_toast_tc';
19793
- var t_spacing = 'mt--15';
19821
+ var t_spacing = 'mt-3';
19794
19822
  }
19795
19823
 
19796
19824
 
@@ -19798,17 +19826,17 @@ return jQuery;
19798
19826
  if(t_pos == 'bottom-center') {
19799
19827
  var _posClass = 'fixed-bottom mx-auto';
19800
19828
  var _wrapperID = 'wrapper_toast_bc';
19801
- var t_spacing = 'mb--15';
19829
+ var t_spacing = 'mb-3';
19802
19830
  }
19803
19831
 
19804
19832
 
19805
19833
  // --
19806
19834
 
19807
19835
  // Toast icon indicator
19808
- var t_icon = (t_type != '') ? '<i class="float-start rounded-circle w--15 h--15 mt--3 bg-'+t_type+'"></i>' : '';
19836
+ var t_icon = (t_type != '') ? '<i class="float-start rounded-circle w--15 h--15 mt--3 bg-' + t_type + '"></i>' : '';
19809
19837
 
19810
19838
  // Autohide in ms
19811
- var t_delay_bs = (t_delay > 0) ? ' data-delay="'+t_delay+'" data-autohide="true"' : ' data-autohide="false" ';
19839
+ var t_delay_bs = (t_delay > 0) ? ' data-delay="' + t_delay + '" data-autohide="true"' : ' data-autohide="false" ';
19812
19840
 
19813
19841
  // Close Button & Progress
19814
19842
  if(t_delay > 0) {
@@ -19819,7 +19847,7 @@ return jQuery;
19819
19847
  } else {
19820
19848
 
19821
19849
  var _btnCloseClass = (t_title == '') ? ' fs--10 mt--n1 ' : '';
19822
- var t_close = '<button type="button" class="close float-end'+_btnCloseClass+'" data-dismiss="toast" aria-label="Close"><span class="fi fi-close fs--16" aria-hidden="true"></span></button>';
19850
+ var t_close = '<button type="button" class="close float-end' + _btnCloseClass + '" data-dismiss="toast" aria-label="Close"><span class="fi fi-close fs--16" aria-hidden="true"></span></button>';
19823
19851
  var t_progress = '';
19824
19852
 
19825
19853
  }
@@ -19829,15 +19857,16 @@ return jQuery;
19829
19857
 
19830
19858
  // Create specific main container if not exists (to avoid destroying current toasts)
19831
19859
  if(jQuery('#'+_wrapperID).length < 1)
19832
- jQuery('body').append('<div id="'+_wrapperID+'" class="w-100 max-w-300 max-h-75vh scrollable-vertical rounded z-index-9999 '+_posClass+'"></div>');
19860
+ jQuery('body').append('<div id="' + _wrapperID + '" class="w-100 max-w-300 max-h-75vh scrollable-vertical rounded z-index-9999 ' + _posClass + '"></div>');
19833
19861
 
19834
19862
 
19835
19863
  // --
19836
19864
 
19837
19865
 
19838
19866
  // BUILD HTML TOAST
19839
- var t_main_class = (t_bg_fill === true && t_type != '') ? 'b--0 bg-'+t_type : 'bg-white';
19840
- var _toastBody = '<div class="toast js-toast '+$.SOW.core.toast.config.animation+' '+t_main_class+' '+t_spacing+'" role="alert" aria-live="polite" aria-atomic="true" '+t_delay_bs+'>';
19867
+ var t_main_class = (t_bg_fill === true && t_type != '') ? 'b-0 bg-'+t_type : 'bg-white';
19868
+ var _toastBody = '<div class="toast js-toast '+$.SOW.core.toast.config.animation+' '+t_main_class+' '+t_spacing+'" role="alert" aria-live="polite" aria-atomic="true" '+t_delay_bs+'>';
19869
+
19841
19870
 
19842
19871
  // No title
19843
19872
  if(t_title != '') {
@@ -19875,7 +19904,7 @@ return jQuery;
19875
19904
  var t_txt_color = (t_bg_fill === true && t_type != '') ? 'text-white' : 'text-'+t_type;
19876
19905
  }
19877
19906
 
19878
- var t_body = '<div class="pt--15 pb--15 '+t_txt_color+'">' + t_body + '</div>';
19907
+ var t_body = '<div class="py-3 '+t_txt_color+'">' + t_body + '</div>';
19879
19908
 
19880
19909
  } else {
19881
19910
 
@@ -21524,6 +21553,7 @@ return jQuery;
21524
21553
  _targetRw = _t.data('toggle-target') || '', // because data-target might be used by collapse!
21525
21554
  _target2 = _t.data('target-2') || '',
21526
21555
  _toastMessage = _t.data('toast-success-message') || '',
21556
+ _toastSuccessType = _t.data('toast-success-type') || 'success', // default|success|danger[error]|warning|info
21527
21557
  _toastPos = _t.data('toast-success-position') || 'top-center',
21528
21558
  _temporized = _t.data('toggle-temporized') || 0,
21529
21559
  _toggleClass = _t.data('toggle-container-class') || '', // toggle class for a specific container
@@ -21539,7 +21569,7 @@ return jQuery;
21539
21569
  return;
21540
21570
 
21541
21571
  // example: Like button - stop if off is not set but on is set!
21542
- // Means only LIKE allowed!
21572
+ // Means only `LIKE` allowed!
21543
21573
  if(_requestOff == '' && _requestOn != '' && _t.hasClass('active'))
21544
21574
  return null;
21545
21575
 
@@ -21585,13 +21615,14 @@ return jQuery;
21585
21615
  if(_bodyToggleClass != '')
21586
21616
  jQuery('body').removeClass(_bodyToggleClass);
21587
21617
 
21588
- _t.removeClass('active');
21618
+ _t.removeClass('active disabled');
21589
21619
 
21590
21620
  }, Number(_temporized));
21591
21621
 
21592
21622
 
21593
21623
  // NO AJAX REQUESTS IF _temporized SET
21594
- return;
21624
+ // [WHY?] 11:56 AM Tuesday, November 05, 2019
21625
+ // return;
21595
21626
  }
21596
21627
 
21597
21628
 
@@ -21665,7 +21696,7 @@ return jQuery;
21665
21696
 
21666
21697
 
21667
21698
  if(_toastMessage != '' && typeof $.SOW.core.toast === 'object')
21668
- $.SOW.core.toast.show('success', '', _toastMessage, _toastPos, 1500, true);
21699
+ $.SOW.core.toast.show(_toastSuccessType, '', _toastMessage, _toastPos, ( (_temporized > 0) ? 3500 : 1500 ), true);
21669
21700
 
21670
21701
  }
21671
21702
 
@@ -23289,7 +23320,7 @@ return jQuery;
23289
23320
 
23290
23321
  cookie_name: '__gdpr',
23291
23322
  cookie_expire: 365,
23292
- cookie_path: $.SOW.globals.cookie_secure, // 'SameSite=None; secure' (Google)
23323
+ cookie_path: '/', /* Safari Issues */ // $.SOW.globals.cookie_secure, // 'SameSite=None; secure' (Google)
23293
23324
 
23294
23325
  },
23295
23326
 
@@ -24781,6 +24812,16 @@ return jQuery;
24781
24812
  selector__timeAgo : '.sow-util-timeago',
24782
24813
  selector__cookie : '.sow-util-cookie',
24783
24814
  selector__slideshow : '.sow-util-slideshow',
24815
+ selector__cloner : '.sow-util-cloner',
24816
+ selector__action : '.sow-util-action',
24817
+
24818
+ // ajax function
24819
+ method : 'GET',
24820
+ contentType : '', // jQuery params
24821
+ dataType : '', // jQuery params
24822
+ headers : '', // jQuery params
24823
+ crossDomain : '', // jQuery params
24824
+ data_params : {ajax:'true'},
24784
24825
 
24785
24826
 
24786
24827
  lang__timeAgo : {
@@ -24823,6 +24864,11 @@ return jQuery;
24823
24864
  // Background Slideshow
24824
24865
  $.SOW.core.utils.slideshow(this.selector+' '+$.SOW.core.utils.config.selector__slideshow);
24825
24866
 
24867
+ // Cloner
24868
+ $.SOW.core.utils.cloner(this.selector+' '+$.SOW.core.utils.config.selector__cloner);
24869
+
24870
+ // Hide/Show/Readonly/Disable
24871
+ $.SOW.core.utils.UtilAction(this.selector+' '+$.SOW.core.utils.config.selector__action);
24826
24872
 
24827
24873
  return null;
24828
24874
 
@@ -25029,7 +25075,7 @@ return jQuery;
25029
25075
  _toggle = _t.data('cookie-toggle') || '',
25030
25076
  _val = _t.data('cookie-val') || '1',
25031
25077
  _expire = _t.data('cookie-expire') || '7',
25032
- _path = _t.data('cookie-path') || $.SOW.globals.cookie_secure,
25078
+ _path = _t.data('cookie-path') || '/', /* Safari Issue */ // $.SOW.globals.cookie_secure,
25033
25079
  toastMsgSet = _t.data('toast-msg-set') || '',
25034
25080
  toastMsgDel = _t.data('toast-msg-del') || '',
25035
25081
  toastMsgPos = _t.data('toast-msg-pos') || 'top-center',
@@ -25207,6 +25253,378 @@ return jQuery;
25207
25253
  $.SOW.helper.consoleLog('Init : ' + scriptInfo + ' : Slideshow');
25208
25254
  // -- * --
25209
25255
 
25256
+ },
25257
+
25258
+
25259
+
25260
+
25261
+ /**
25262
+ *
25263
+ * @cloner
25264
+ *
25265
+ *
25266
+ **/
25267
+ cloner: function(selector) {
25268
+
25269
+ var el = jQuery(selector);
25270
+
25271
+ if(el.length < 1)
25272
+ return;
25273
+
25274
+ el.not('.js-sowclonified').addClass('js-sowclonified').on('click', function(e) {
25275
+ e.preventDefault();
25276
+
25277
+ var _t = jQuery(this),
25278
+ _target = _t.data('clone-target') || '',
25279
+ _destination = _t.data('clone-destination') || '',
25280
+ _cloneLimit = _t.data('clone-limit') || 0,
25281
+ _cloneMethod = _t.data('clone-method') || 'append', // append|prepend
25282
+ _initSortable = _t.attr('data-clone-sortable') || 'false';
25283
+
25284
+ if(_target == '' || _destination == '')
25285
+ return null;
25286
+
25287
+
25288
+ // clone and add required classes to work with
25289
+ var clone = jQuery(_target).clone();
25290
+ clone.addClass('js-cloned js-cloned-fresh');
25291
+
25292
+
25293
+ // limit cloned elements
25294
+ if(Number(_cloneLimit) > 0) {
25295
+ if(jQuery('.js-cloned', _destination).length >= Number(_cloneLimit)) {
25296
+ _t.addClass('disabled').prop('disabled', true);
25297
+ return false;
25298
+ }
25299
+ }
25300
+
25301
+
25302
+ // append clone
25303
+ if(_cloneMethod == 'prepend')
25304
+ jQuery(_destination).prepend(clone);
25305
+ else
25306
+ jQuery(_destination).append(clone);
25307
+
25308
+
25309
+ // Clean inputs of clones
25310
+ jQuery('.js-cloned-fresh input[type=text], .js-cloned-fresh input[type=email], .js-cloned-fresh input[type=number], .js-cloned-fresh textarea', _destination).val(''); // empty
25311
+
25312
+
25313
+ // replace classes, where is required
25314
+ jQuery('.js-cloned-fresh [data-cloned-replace-class]', _destination).each(function() {
25315
+ var __t = jQuery(this);
25316
+ __t.removeAttr('class').attr('class', __t.data('cloned-replace-class'));
25317
+ });
25318
+
25319
+
25320
+ // bind remove button to clone
25321
+ jQuery('.js-cloned-fresh '+selector+', .js-cloned-fresh .btn-clone-remove').removeClass('sow-util-cloner').on('click', function(e) {
25322
+ e.preventDefault();
25323
+ jQuery(this).parents('.js-cloned').remove();
25324
+ _t.removeClass('disabled').prop('disabled', false);
25325
+ });
25326
+
25327
+
25328
+ // remove identifier classes - job done!
25329
+ jQuery('.js-cloned-fresh', _destination).removeClass('js-cloned-fresh');
25330
+
25331
+
25332
+ // init sortable
25333
+ if(_initSortable+'' == 'true') {
25334
+
25335
+ if(typeof $.SOW.vendor.sortable === 'object')
25336
+ $.SOW.vendor.sortable.init(_destination, null);
25337
+
25338
+ }
25339
+
25340
+ // Reinits
25341
+ $.SOW.reinit(_destination);
25342
+
25343
+ });
25344
+
25345
+
25346
+
25347
+
25348
+ /**
25349
+
25350
+ Preadded clones : remove button
25351
+ (on load)
25352
+
25353
+ **/
25354
+ jQuery('.js-cloned').not('.js-clonedbounded').addClass('js-clonedbounded').each(function() {
25355
+
25356
+ var _href = jQuery('a[data-clone-target]', jQuery(this));
25357
+
25358
+ _href.on('click', function(e) {
25359
+
25360
+ var _target = jQuery(this).data('clone-target') || '';
25361
+ if(_target == '') return;
25362
+
25363
+ e.preventDefault();
25364
+ jQuery(this).parents('.js-cloned').remove();
25365
+ jQuery('a.sow-util-cloner', _target).removeClass('disabled').prop('disabled', false);
25366
+
25367
+ });
25368
+
25369
+ });
25370
+
25371
+ },
25372
+
25373
+
25374
+
25375
+
25376
+
25377
+ /**
25378
+ *
25379
+ * @UtilAction
25380
+ *
25381
+ *
25382
+ **/
25383
+ UtilAction: function(selector) {
25384
+
25385
+ var el = jQuery(selector);
25386
+
25387
+ if(el.length < 1)
25388
+ return;
25389
+
25390
+ if(el.hasClass('js-sowutilified'))
25391
+ return;
25392
+
25393
+ el.not('.js-sowutilified').addClass('js-sowutilified').on('click', function(e) {
25394
+
25395
+ var _t = jQuery(this),
25396
+
25397
+ // 'true' = do not toggle 'active'class
25398
+ _targetSelfIgnore = _t.attr('data-util-self-ignore') || 'false',
25399
+
25400
+ _targetHide = _t.data('util-target-hide') || '',
25401
+ _targetShow = _t.data('util-target-show') || '',
25402
+
25403
+ _targetClassAdd = _t.data('util-target-class-add') || '',
25404
+ _targetClassAddVal = _t.data('util-target-class-add-val') || '',
25405
+
25406
+ _targetClassDel = _t.data('util-target-class-remove') || '',
25407
+ _targetClassDelVal = _t.data('util-target-class-remove-val') || '',
25408
+
25409
+ _targetClassToggle = _t.data('util-target-class-toggle') || '',
25410
+ _targetClassToggleVal = _t.data('util-target-class-toggle-val') || '',
25411
+
25412
+ _targetInput = _t.data('util-target-input') || '',
25413
+ _targetInpuVal = _t.data('util-target-input-val') || '',
25414
+
25415
+ _targetPlaceholder = _t.data('util-target-placeholder') || '',
25416
+ _targetPlaceholderVal = _t.data('util-target-placeholder-val') || '',
25417
+
25418
+ _targetReadonlyOn = _t.data('util-target-readonly-on') || '',
25419
+ _targetReadonlyOff = _t.data('util-target-readonly-off') || '',
25420
+ _targetReadonlyToggle = _t.data('util-target-readonly-toggle') || '',
25421
+
25422
+ _targetDisableOn = _t.data('util-target-disable-on') || '',
25423
+ _targetDisableOff = _t.data('util-target-disable-off') || '',
25424
+ _targetDisableToggle = _t.data('util-target-disable-toggle') || '',
25425
+
25426
+ _targetRemove = _t.data('util-target-remove') || '',
25427
+
25428
+ _targetFocus = _t.data('util-target-focus') || '',
25429
+
25430
+ // general toast, different than ajax
25431
+ _toastMsg = _t.data('util-toast-msg') || '',
25432
+ _toastPosition = _t.data('util-toast-position') || 'top-center',
25433
+ _toastType = _t.data('util-toast-type') || 'success',
25434
+ _toastTiming = _t.data('util-toast-timeout') || 2500,
25435
+
25436
+ // Ajax
25437
+ _targetAjaxRequest = _t.data('util-ajax-request') || '',
25438
+ _targetAjaxMethod = _t.data('util-ajax-method') || $.SOW.core.utils.config.method,
25439
+ _targetAjaxParams = _t.data('util-ajax-params') || '',
25440
+ _toastAjaxSuccessMsg = _t.data('util-ajax-toast-success') || 'Sucessfully Updated!',
25441
+ _toastAjaxPosition = _t.data('util-ajax-toast-position') || 'top-center',
25442
+ _toastAjaxTiming = _t.data('util-ajax-toast-timeout') || 2500;
25443
+
25444
+
25445
+ // Links only!
25446
+ if(_t.attr('href'))
25447
+ e.preventDefault();
25448
+
25449
+ // Label : because fire twice
25450
+ // Is a DOM `issue` - the way it works
25451
+ if('label', _t) {
25452
+ e.preventDefault();
25453
+
25454
+ if(jQuery('input', _t).is(':checked')) {
25455
+ jQuery('input', _t).removeAttr('checked');
25456
+ } else {
25457
+ jQuery('input', _t).attr('checked', true);
25458
+ }
25459
+
25460
+ }
25461
+
25462
+
25463
+ if(_targetSelfIgnore+'' != 'true')
25464
+ _t.toggleClass('active');
25465
+
25466
+
25467
+ // hide
25468
+ if(_targetHide != '')
25469
+ jQuery(_targetHide).addClass('hide hide-force');
25470
+
25471
+ // show
25472
+ if(_targetShow != '')
25473
+ jQuery(_targetShow).removeClass('hide hide-force');
25474
+
25475
+ // value
25476
+ if(_targetInput != '')
25477
+ jQuery(_targetInput).val(_targetInpuVal);
25478
+
25479
+ // placeholder
25480
+ if(_targetPlaceholder != '')
25481
+ jQuery(_targetPlaceholder).val(_targetPlaceholderVal);
25482
+
25483
+ // class add
25484
+ if(_targetClassAdd != '')
25485
+ jQuery(_targetClassAdd).addClass(_targetClassAddVal);
25486
+
25487
+ // class remove
25488
+ if(_targetClassDel != '')
25489
+ jQuery(_targetClassDel).addClass(_targetClassDelVal);
25490
+
25491
+ // class toggle
25492
+ if(_targetClassToggle != '')
25493
+ jQuery(_targetClassToggle).toggleClass(_targetClassToggleVal);
25494
+
25495
+ // remove element
25496
+ if(_targetRemove != '')
25497
+ jQuery(_targetRemove).remove();
25498
+
25499
+
25500
+
25501
+ // readonly:on
25502
+ if(_targetReadonlyOn != '')
25503
+ jQuery(_targetReadonlyOn).addClass('readonly').attr('readonly', true).prop('readonly', true);
25504
+
25505
+ // readonly:off
25506
+ if(_targetReadonlyOff != '')
25507
+ jQuery(_targetReadonlyOff).removeClass('readonly').removeAttr('readonly').prop('readonly', false);
25508
+
25509
+ // readonly:toggle
25510
+ if(_targetReadonlyToggle != '') {
25511
+ if(jQuery(_targetReadonlyToggle).attr('readonly')) {
25512
+ jQuery(_targetReadonlyToggle).removeClass('readonly').removeAttr('readonly').prop('readonly', false);
25513
+ } else {
25514
+ jQuery(_targetReadonlyToggle).removeClass('readonly').removeAttr('readonly').prop('readonly', false);
25515
+ }
25516
+ }
25517
+
25518
+
25519
+ // disable:on
25520
+ if(_targetDisableOn != '')
25521
+ jQuery(_targetDisableOn).addClass('disabled').attr('disabled', true).prop('disabled', true);
25522
+
25523
+ // disable:off
25524
+ if(_targetDisableOff != '')
25525
+ jQuery(_targetDisableOff).removeClass('disabled').removeAttr('disabled').prop('disabled', false);
25526
+
25527
+ // disable:toggle
25528
+ if(_targetDisableToggle != '') {
25529
+ if(jQuery(_targetDisableToggle).attr('disabled')) {
25530
+ jQuery(_targetDisableToggle).removeClass('disabled').removeAttr('disabled').prop('disabled', false);
25531
+ } else {
25532
+ jQuery(_targetDisableToggle).removeClass('disabled').removeAttr('disabled').prop('disabled', false);
25533
+ }
25534
+ }
25535
+
25536
+
25537
+ // focus
25538
+ if(_targetFocus != '') {
25539
+
25540
+ setTimeout(function() {
25541
+
25542
+ jQuery(_targetFocus).focus();
25543
+
25544
+ }, 400);
25545
+
25546
+ }
25547
+
25548
+
25549
+ // Toast message
25550
+ if(_targetAjaxRequest == '' && _toastMsg != '') {
25551
+
25552
+ if(typeof $.SOW.core.toast === 'object')
25553
+ $.SOW.core.toast.show(_toastType, '', _toastMsg, _toastPosition, Number(_toastTiming), true);
25554
+
25555
+ }
25556
+
25557
+
25558
+
25559
+
25560
+ // AJAX REQUEST
25561
+ if(_targetAjaxRequest != '') {
25562
+
25563
+ var data_params = $.SOW.core.utils.config.data_params;
25564
+ if(_targetAjaxParams != '') {
25565
+
25566
+ var ajax_params_arr = $.SOW.helper.params_parse(_targetAjaxParams);
25567
+ for (var i = 0; i < ajax_params_arr.length; ++i) {
25568
+ data_params[ajax_params_arr[i][0]] = ajax_params_arr[i][1];
25569
+ }
25570
+
25571
+ }
25572
+
25573
+ // Ajax Request
25574
+ jQuery.ajax({
25575
+ url: _targetAjaxRequest,
25576
+ type: _targetAjaxMethod,
25577
+ data: data_params,
25578
+ contentType: $.SOW.core.utils.config.contentType,
25579
+ dataType: $.SOW.core.utils.config.dataType,
25580
+ headers: $.SOW.core.utils.config.headers,
25581
+ crossDomain: $.SOW.core.utils.config.crossDomain,
25582
+
25583
+ beforeSend: function() {
25584
+
25585
+ $.SOW.helper.consoleLog('SOW Util : [Ajax][Request Sent]: ' + _targetAjaxRequest);
25586
+
25587
+ },
25588
+
25589
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
25590
+
25591
+ if(typeof $.SOW.core.toast === 'object') {
25592
+ $.SOW.core.toast.show('danger', '404 Error', 'Unexpected Internal error!', 'bottom-center', 0, true);
25593
+ } else {
25594
+ alert("[404] Unexpected internal error!");
25595
+ }
25596
+
25597
+ // if debug enabled, see config
25598
+ if($.SOW.config.sow__debug_enable === true) {
25599
+ $.SOW.helper.consoleLog('----------------------------');
25600
+ $.SOW.helper.consoleLog('--- AJAX REQUEST ERROR ----');
25601
+ $.SOW.helper.consoleLog(' - MODAL -');
25602
+ $.SOW.helper.consoleLog('1. XMLHttpRequest:');
25603
+ $.SOW.helper.consoleLog(XMLHttpRequest);
25604
+ $.SOW.helper.consoleLog('2. textStatus:');
25605
+ $.SOW.helper.consoleLog(textStatus);
25606
+ $.SOW.helper.consoleLog('3. errorThrown:');
25607
+ $.SOW.helper.consoleLog(errorThrown);
25608
+ $.SOW.helper.consoleLog('----------------------------');
25609
+ }
25610
+
25611
+ },
25612
+
25613
+ success: function(data) {
25614
+
25615
+ $.SOW.helper.consoleLog('SOW Util : [Ajax][Server Response]: ' + data);
25616
+
25617
+ if(_toastAjaxSuccessMsg != '' && typeof $.SOW.core.toast === 'object')
25618
+ $.SOW.core.toast.show('success', '', _toastAjaxSuccessMsg, _toastAjaxPosition, Number(_toastAjaxTiming), true);
25619
+
25620
+ }
25621
+
25622
+ });
25623
+
25624
+ }
25625
+
25626
+ });
25627
+
25210
25628
  }
25211
25629
 
25212
25630
  };
@@ -25355,7 +25773,6 @@ return jQuery;
25355
25773
  }
25356
25774
  })(this);
25357
25775
 
25358
- $.SOW.config.sow__debug_enable = true;
25359
25776
  if(typeof $.SOW.config.autoinit === 'undefined') { $.SOW.config.autoinit = {}; }
25360
25777
  $.SOW.config.autoinit['sow_header'] = ['$.SOW.core.header.init','null', null,false];
25361
25778
  $.SOW.config.autoinit['sow_search_suggest'] = ['$.SOW.core.search_suggest.init','form.js-ajax-search', null,false];
@@ -25384,4 +25801,4 @@ $.SOW.config.autoinit['sow_search_inline'] = ['$.SOW.core.search_inline.init','i
25384
25801
  $.SOW.config.autoinit['sow_timer_autohide'] = ['$.SOW.core.timer_autohide.init','.timer-autohide', null,true];
25385
25802
  $.SOW.config.autoinit['sow_timer_countdown'] = ['$.SOW.core.timer_countdown.init','.timer-countdown', null,true];
25386
25803
  $.SOW.config.autoinit['sow_gfont'] = ['$.SOW.core.gfont.init','[data-gfont]', null,true];
25387
- $.SOW.config.autoinit['sow_utils'] = ['$.SOW.core.utils.init','', {selector__initialFromString:".sow-util-initials",selector__timeAgo:".sow-util-timeago",selector__cookie:".sow-util-cookie",lang__timeAgo:{seconds:"less than a minute ago",minute:"about a minute ago",minutes:"%d minutes ago",hour:"about an hour ago",hours:"about %d hours ago",day:"a day ago",days:"%d days ago",month:"about a month ago",months:"%d months ago",year:"about a year ago",years:"%d years ago"}},true];
25804
+ $.SOW.config.autoinit['sow_utils'] = ['$.SOW.core.utils.init','', {selector__initialFromString:".sow-util-initials",selector__timeAgo:".sow-util-timeago",selector__cookie:".sow-util-cookie",selector__slideshow:".sow-util-slideshow",selector__cloner:".sow-util-cloner",selector__action:".sow-util-action",lang__timeAgo:{seconds:"less than a minute ago",minute:"about a minute ago",minutes:"%d minutes ago",hour:"about an hour ago",hours:"about %d hours ago",day:"a day ago",days:"%d days ago",month:"about a month ago",months:"%d months ago",year:"about a year ago",years:"%d years ago"}},true];