phcthemes_admin_panel_pack 1.0.0 → 1.0.1

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: 7d71615bf1434ae02ba2c384baeb97a8577cf6fad7cb6e0d8b3eb4400a680832
4
- data.tar.gz: 877965347c9a5e4368e5cbbd2b766816dd535f407c3984810e293eb4c6f9aaf8
3
+ metadata.gz: f4d6578508a5d9f00bc2e556128344d8af88c422791c24be7df85e2401a2c707
4
+ data.tar.gz: 984c356fe7ad657b48821fdbaeffdb203fad209e001ca0361b5d67f606eead07
5
5
  SHA512:
6
- metadata.gz: f77f7c5c107fc5d00438e1575f6e62276445f4f91517bafab5e3f393479e4b16401135bbd95586f46f580c443dc0e7c2cadf41537c3b091b30d470b7d915cf75
7
- data.tar.gz: 5452564f6d885f0c2c4d414408274cbf14204623784fd014093293ce0a9ebfeee151c7df057121b36cbe0c3f49f8c2ecea77df310e3d8794684da01a26e23dd5
6
+ metadata.gz: 81d976ca4a0ba6909ec615ac756dbd17806182f5c1841c34a08beea31790b8268e47c96b9db69df8753222821a5ddda6b0402a6e5f85c7493251e5b8b0b77df9
7
+ data.tar.gz: 0fc550d31a5b1f99ae0bf5077306bef3fc7e9cb8cbcd9ad82fb2a9c647b949723136d529368d4e86ac89ed8ca763fae8fa5ff8e837f9026d85d07b3095507995
@@ -0,0 +1,98 @@
1
+ /*
2
+ * HTML5 Sortable jQuery Plugin
3
+ * http://farhadi.ir/projects/html5sortable
4
+ *
5
+ * Copyright 2012, Ali Farhadi
6
+ * Released under the MIT license.
7
+ */
8
+ (function ($) {
9
+ var dragging, placeholders = $();
10
+ $.fn.sortable = function (options) {
11
+ var method = String(options);
12
+ options = $.extend({
13
+ connectWith: false,
14
+ placeholderClass: ''
15
+ }, options);
16
+ return this.each(function () {
17
+ if (/^enable|disable|destroy$/.test(method)) {
18
+ var dragitems = $(this).children($(this).data('items')).attr('draggable', method == 'enable');
19
+ if (method == 'destroy') {
20
+ dragitems.add(this).removeData('connectWith items')
21
+ .off('dragstart.h5s dragend.h5s selectstart.h5s dragover.h5s dragenter.h5s drop.h5s');
22
+ }
23
+ return;
24
+ }
25
+ var isHandle, parent, index, items = $(this).children(options.items);
26
+ var placeholder = $('<' + (/^ul|ol$/i.test(this.tagName) ? 'li' : /^tbody$/i.test(this.tagName) ? 'tr' : 'div') +
27
+ ' class="sortable-placeholder ' + options.placeholderClass + '">').html('&nbsp;');
28
+ items.find(options.handle).mousedown(function () {
29
+ isHandle = true;
30
+ }).mouseup(function () {
31
+ isHandle = false;
32
+ });
33
+ $(this).data('items', options.items)
34
+ placeholders = placeholders.add(placeholder);
35
+ if (options.connectWith) {
36
+ $(options.connectWith).add(this).data('connectWith', options.connectWith);
37
+ }
38
+ items.attr('draggable', 'true').on('dragstart.h5s', function (e) {
39
+ if (options.handle && !isHandle) {
40
+ return false;
41
+ }
42
+ isHandle = false;
43
+ var dt = e.originalEvent.dataTransfer;
44
+ dt.effectAllowed = 'move';
45
+ dt.setData('Text', 'dummy');
46
+ index = (dragging = $(this)).addClass('sortable-dragging').index();
47
+ parent = dragging.parent();
48
+ }).on('dragend.h5s', function () {
49
+ if (!dragging) {
50
+ return;
51
+ }
52
+ dragging.removeClass('sortable-dragging').show();
53
+ placeholders.detach();
54
+ if (index != dragging.index()) {
55
+ dragging.parent().trigger('sortupdate', {
56
+ item: dragging
57
+ });
58
+ }
59
+ if (!dragging.parent().is(parent)) {
60
+ dragging.parent().trigger('sortconnect', {
61
+ item: dragging
62
+ });
63
+ }
64
+ dragging = null;
65
+ }).not('a[href], img').on('selectstart.h5s', function () {
66
+ this.dragDrop && this.dragDrop();
67
+ return false;
68
+ }).end().add([this, placeholder]).on('dragover.h5s dragenter.h5s drop.h5s', function (e) {
69
+ if (!items.is(dragging) && options.connectWith !== $(dragging).parent().data('connectWith')) {
70
+ return true;
71
+ }
72
+ if (e.type == 'drop') {
73
+ e.stopPropagation();
74
+ placeholders.filter(':visible').after(dragging);
75
+ dragging.trigger('dragend.h5s');
76
+ return false;
77
+ }
78
+ e.preventDefault();
79
+ e.originalEvent.dataTransfer.dropEffect = 'move';
80
+ if (items.is(this)) {
81
+ if (options.forcePlaceholderHeight || options.forcePlaceholderSize) {
82
+ placeholder.height(dragging.outerHeight());
83
+ }
84
+ if (options.forcePlaceholderWidth || options.forcePlaceholderSize) {
85
+ placeholder.width(dragging.outerWidth());
86
+ }
87
+ dragging.hide();
88
+ $(this)[placeholder.index() < $(this).index() ? 'after' : 'before'](placeholder);
89
+ placeholders.not(placeholder).detach();
90
+ } else if (!placeholders.is(this) && !$(this).children(options.items).length) {
91
+ placeholders.detach();
92
+ $(this).append(placeholder);
93
+ }
94
+ return false;
95
+ });
96
+ });
97
+ };
98
+ })(jQuery);
@@ -2,3 +2,4 @@
2
2
  //= require activestorage
3
3
  //= require themes/metronic/theme/vendors.bundle.js
4
4
  //= require common/datatables/datatables.js
5
+ //= require common/html5sortable/jquery.sortable.js
@@ -1,3 +1,3 @@
1
1
  module PhcthemesAdminPanelPack
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcthemes_admin_panel_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-21 00:00:00.000000000 Z
11
+ date: 2019-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -337,6 +337,7 @@ files:
337
337
  - app/assets/javascripts/common/fastclick/fastclick.js
338
338
  - app/assets/javascripts/common/flexslider/jquery.flexslider.js
339
339
  - app/assets/javascripts/common/greenstock/greensock.js
340
+ - app/assets/javascripts/common/html5sortable/jquery.sortable.js
340
341
  - app/assets/javascripts/common/icheck/icheck.js
341
342
  - app/assets/javascripts/common/imagesloaded/imagesloaded.pkgd.js
342
343
  - app/assets/javascripts/common/isotope/isotope.pkgd.js