phcthemes_web_theme_pack 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a91a163f22571be1d0a2219b4a19f16d2bccb41c415e526e9de9191a8d0aa54
|
4
|
+
data.tar.gz: 6091c3c1d31f846a77d72d4b5e3620cb1bacc4b8d59467f810b037cdbd25d82f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dd7214a9ca69dcef7caba369338afb0989323c31b07fce67d4f72a8b65c3c42562d5d53b2c05b5266362df01e6e13ce7716075bb348779a63f3326fa7328dd7
|
7
|
+
data.tar.gz: a6f50944c5e04437632c90f51cf3e7cbc7ac5792df35ed4f32b9032380551e035d445490c7551dd4dbda505de8a8395eadea281589f9dbe735cb74b496b3f873
|
@@ -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(' ');
|
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,8 +2,8 @@ module PhcthemesWebThemePack
|
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
|
4
4
|
# Jquery Dependencies
|
5
|
-
require
|
6
|
-
require
|
5
|
+
require "jquery-rails"
|
6
|
+
require "jquery-ui-rails"
|
7
7
|
|
8
8
|
# Asset Dependencies
|
9
9
|
require "coffee-rails"
|
@@ -12,7 +12,8 @@ module PhcthemesWebThemePack
|
|
12
12
|
require "uglifier"
|
13
13
|
|
14
14
|
# Frontend Dependencies
|
15
|
-
require
|
15
|
+
require "gravtastic"
|
16
|
+
require "rails_sortable"
|
16
17
|
|
17
18
|
end
|
18
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcthemes_web_theme_pack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.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-
|
11
|
+
date: 2019-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '3.2'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rails_sortable
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.3'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.3'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: sqlite3
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -337,6 +351,7 @@ files:
|
|
337
351
|
- app/assets/javascripts/common/fastclick/fastclick.js
|
338
352
|
- app/assets/javascripts/common/flexslider/jquery.flexslider.js
|
339
353
|
- app/assets/javascripts/common/greenstock/greensock.js
|
354
|
+
- app/assets/javascripts/common/html5sortable/jquery.sortable.js
|
340
355
|
- app/assets/javascripts/common/icheck/icheck.js
|
341
356
|
- app/assets/javascripts/common/imagesloaded/imagesloaded.pkgd.js
|
342
357
|
- app/assets/javascripts/common/isotope/isotope.pkgd.js
|