Compare commits
1049 Commits
v1.5.0
...
v1.8.10-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c72d17dc83 | ||
|
|
78ffdec693 | ||
|
|
49c19a1d6a | ||
|
|
e854eb0426 | ||
|
|
4a9c17cb28 | ||
|
|
0d1547f439 | ||
|
|
fa5ed529cb | ||
|
|
accb3076e9 | ||
|
|
a4e4e1ec68 | ||
|
|
4809237ecc | ||
|
|
81877fedb6 | ||
|
|
1f2c6f2a85 | ||
|
|
4fe5e60967 | ||
|
|
f4eb9cb790 | ||
|
|
775f9b3ada | ||
|
|
188b33921c | ||
|
|
20c033317f | ||
|
|
e7a5d063ac | ||
|
|
1fda781d7e | ||
|
|
45fc801a08 | ||
|
|
21337a5b50 | ||
|
|
ec36a843cf | ||
|
|
e99dbaf4d8 | ||
|
|
c83ad2ecc4 | ||
|
|
80d8d18eb2 | ||
|
|
903d1afb53 | ||
|
|
cd55d2e2ff | ||
|
|
05cf8c4351 | ||
|
|
b04d815408 | ||
|
|
7b370a2eb6 | ||
|
|
5808b601b8 | ||
|
|
fdcd3dc3e3 | ||
|
|
c4bd085393 | ||
|
|
0e91d01412 | ||
|
|
fcb9e9fa56 | ||
|
|
3591354cb1 | ||
|
|
b38eab11eb | ||
|
|
c43dea60b7 | ||
|
|
268bea25d0 | ||
|
|
e94ae20b31 | ||
|
|
a94961c0a7 | ||
|
|
0d5fde919b | ||
|
|
429ef4e2ba | ||
|
|
e8999d23e1 | ||
|
|
209c9242d9 | ||
|
|
6defb09d2e | ||
|
|
2774c09d7a | ||
|
|
c62a044598 | ||
|
|
f73fbe7f23 | ||
|
|
5e1e4c1d19 | ||
|
|
cc5a335fb7 | ||
|
|
91fc3f33a0 | ||
|
|
648753b412 | ||
|
|
24fcc3dd34 | ||
|
|
14fb40a996 | ||
|
|
f4511fc74d | ||
|
|
3d0f192490 | ||
|
|
6b7cdf3a37 | ||
|
|
052d6c6b02 | ||
|
|
6e5c878491 | ||
|
|
c0c6cd1a60 | ||
|
|
2ad433590d | ||
|
|
2cb3da56ab | ||
|
|
8582e6d6b4 | ||
|
|
170101cbfe | ||
|
|
8107f49373 | ||
|
|
7ef0964af2 | ||
|
|
18472ea8c3 | ||
|
|
36e0f45a89 | ||
|
|
bea0b2b1e5 | ||
|
|
9a69951136 | ||
|
|
e19bab1aa2 | ||
|
|
8e2a111a0b | ||
|
|
70707969f3 | ||
|
|
2fe25c6219 | ||
|
|
cc1ef5b28b | ||
|
|
3fc2070b2c | ||
|
|
d22f5678be | ||
|
|
0429906eed | ||
|
|
88a09da325 | ||
|
|
963f0d601f | ||
|
|
8570471c00 | ||
|
|
7925af30d6 | ||
|
|
6f59751582 | ||
|
|
2d2792225a | ||
|
|
a079a64cbe | ||
|
|
656be690a3 | ||
|
|
167045f695 | ||
|
|
dbe968afbb | ||
|
|
179b995fa0 | ||
|
|
4791086207 | ||
|
|
be6b09a6e0 | ||
|
|
f235099859 | ||
|
|
ff8ca521ff | ||
|
|
98f7d52493 | ||
|
|
4815405839 | ||
|
|
42a6e35185 | ||
|
|
408a57479e | ||
|
|
beaf54107c | ||
|
|
e45d1d42b4 | ||
|
|
bc442c7819 | ||
|
|
6a361f2d7b | ||
|
|
a62998e5f1 | ||
|
|
ebcb8ff3e7 | ||
|
|
da8c107331 | ||
|
|
5870927518 | ||
|
|
e008a154e5 | ||
|
|
a2d01b5144 | ||
|
|
8afd5c509b | ||
|
|
311f72e4cb | ||
|
|
78563a7d75 | ||
|
|
9284dd9b63 | ||
|
|
92981e4fcd | ||
|
|
9235727d45 | ||
|
|
fc4ead9b05 | ||
|
|
b8622e95b7 | ||
|
|
f8341dccd4 | ||
|
|
b8ed7789f0 | ||
|
|
6d19613ecc | ||
|
|
0d56cbf169 | ||
|
|
67730e82c3 | ||
|
|
940ca7ade1 | ||
|
|
05f9747f15 | ||
|
|
27903ab744 | ||
|
|
931e528e14 | ||
|
|
6bed94a09b | ||
|
|
165b437f31 | ||
|
|
b526307ad1 | ||
|
|
a7bfddfcb5 | ||
|
|
52e4722dcb | ||
|
|
017916b193 | ||
|
|
02e5ba4dfd | ||
|
|
651626eb4f | ||
|
|
20d01c3047 | ||
|
|
a391b6f076 | ||
|
|
ade73f66c8 | ||
|
|
44970a13bb | ||
|
|
d80f080af5 | ||
|
|
6ec7276cfc | ||
|
|
2444d3b547 | ||
|
|
e899633aff | ||
|
|
a9f01c0f0d | ||
|
|
e021afdd8a | ||
|
|
88dea0f2b8 | ||
|
|
5150025641 | ||
|
|
fc400741b4 | ||
|
|
5cb2194f5e | ||
|
|
64f6a794fc | ||
|
|
764c95488c | ||
|
|
6cabba4cd8 | ||
|
|
bd1cd527d3 | ||
|
|
d17f9dc504 | ||
|
|
f62c583130 | ||
|
|
b1e27e0dad | ||
|
|
6ae1272281 | ||
|
|
e0cb6ed60a | ||
|
|
8aeec74fed | ||
|
|
7cd7e7367b | ||
|
|
4f4fe90db4 | ||
|
|
7a7cd3a937 | ||
|
|
bfc01e7c89 | ||
|
|
bc5672b5eb | ||
|
|
d77f775c4c | ||
|
|
7531c8cbc9 | ||
|
|
38fe0afc03 | ||
|
|
252f876827 | ||
|
|
6d9bae8ef9 | ||
|
|
0b2281dfe2 | ||
|
|
72cff0688a | ||
|
|
9793450ed0 | ||
|
|
c8f0502e71 | ||
|
|
b075ed373a | ||
|
|
eef308c4f6 | ||
|
|
70225afa13 | ||
|
|
0a67876815 | ||
|
|
b59e5ad248 | ||
|
|
287e0b5b55 | ||
|
|
c6a1560845 | ||
|
|
45dc1341d3 | ||
|
|
7d7197da58 | ||
|
|
066f42070a | ||
|
|
cad3464f56 | ||
|
|
bbcaef20a8 | ||
|
|
43726a0b23 | ||
|
|
6e6efea328 | ||
|
|
a2a6ce1b3e | ||
|
|
3a69c958ef | ||
|
|
14ee7a06ae | ||
|
|
6cd8289b27 | ||
|
|
d0509b54bf | ||
|
|
ee905cad5f | ||
|
|
01efb63ad3 | ||
|
|
7981feefa1 | ||
|
|
d4fd66461e | ||
|
|
071ba5285d | ||
|
|
6795237a2d | ||
|
|
57363e2da5 | ||
|
|
da9a3ce9f3 | ||
|
|
c4318030d3 | ||
|
|
44a301edb1 | ||
|
|
dabac50128 | ||
|
|
6030e9a294 | ||
|
|
9b656eaf4f | ||
|
|
22080a9a08 | ||
|
|
d93fe3cf2c | ||
|
|
1ea4f4274c | ||
|
|
bd11c6ce14 | ||
|
|
e8848451a5 | ||
|
|
f4f38b4183 | ||
|
|
27283c50b8 | ||
|
|
3e77534dcf | ||
|
|
5e214a32b3 | ||
|
|
7498b7f098 | ||
|
|
268c8dbcdd | ||
|
|
dbbd52cace | ||
|
|
1770a67cd9 | ||
|
|
3678d4d018 | ||
|
|
3de69987e6 | ||
|
|
cbbb047fc1 | ||
|
|
338d3cbc38 | ||
|
|
4c438ff101 | ||
|
|
631b19084a | ||
|
|
63e815c7fc | ||
|
|
b7e9ffc9da | ||
|
|
d8ce0e7d58 | ||
|
|
a115f2a268 | ||
|
|
c0c8b07add | ||
|
|
5913004e14 | ||
|
|
f4034b1065 | ||
|
|
db93b74490 | ||
|
|
d574b8943b | ||
|
|
46fcf7b62e | ||
|
|
3e565ad7cb | ||
|
|
0e01350107 | ||
|
|
7d79fffa33 | ||
|
|
4117b32ebd | ||
|
|
7a68cc7da1 | ||
|
|
20e6b703d9 | ||
|
|
a1535d6c04 | ||
|
|
f33df883a0 | ||
|
|
48acf80c85 | ||
|
|
d8f8c0df16 | ||
|
|
8ce917a422 | ||
|
|
6546d2763b | ||
|
|
d3a3b2da9a | ||
|
|
fdd6400cb8 | ||
|
|
225e436293 | ||
|
|
0e354f8fc1 | ||
|
|
a6a0bdb063 | ||
|
|
6753320336 | ||
|
|
a3b91dabe5 | ||
|
|
257441c9be | ||
|
|
1497d2c3bb | ||
|
|
8f0bc367d0 | ||
|
|
764219b9ed | ||
|
|
7f7ee25e27 | ||
|
|
1765ba0422 | ||
|
|
32d2adc8a2 | ||
|
|
d890770104 | ||
|
|
376c4c3e0e | ||
|
|
a0b740f52d | ||
|
|
0d4c4f20df | ||
|
|
ab707cf312 | ||
|
|
9989b76b7d | ||
|
|
04a714426f | ||
|
|
b66cf14bcb | ||
|
|
b78739f777 | ||
|
|
fb08759bec | ||
|
|
a4755865ca | ||
|
|
5318aaedcf | ||
|
|
3e56571e59 | ||
|
|
e57a25d05f | ||
|
|
b59a1cc232 | ||
|
|
720ca17533 | ||
|
|
d48b00c77c | ||
|
|
77f43e3ca7 | ||
|
|
23b8fbbbc7 | ||
|
|
b0402daf32 | ||
|
|
079788b4eb | ||
|
|
21ed37189a | ||
|
|
80d755da0d | ||
|
|
8d534041b2 | ||
|
|
e91c313f1e | ||
|
|
2f241485a2 | ||
|
|
f14ca87eb5 | ||
|
|
1caf648fe5 | ||
|
|
ac39c93bbf | ||
|
|
63617f80c5 | ||
|
|
a94a30f422 | ||
|
|
63dc48a075 | ||
|
|
bc798504e0 | ||
|
|
fd32152e88 | ||
|
|
1877bea68d | ||
|
|
f7523ad88c | ||
|
|
ae2357d309 | ||
|
|
8afbdcaf79 | ||
|
|
3e590f92ff | ||
|
|
a6cfa061e4 | ||
|
|
d59db1cd97 | ||
|
|
7cfb25ace9 | ||
|
|
51f97f5b28 | ||
|
|
33d940c736 | ||
|
|
08b9b50f33 | ||
|
|
7c3968b64e | ||
|
|
c59cd21698 | ||
|
|
92694c729f | ||
|
|
7b2b285ba7 | ||
|
|
caeb8f08e7 | ||
|
|
499237715e | ||
|
|
7eb2dfba48 | ||
|
|
815cf16822 | ||
|
|
a3722dee80 | ||
|
|
79ea2fd39d | ||
|
|
b349c28b9b | ||
|
|
40ca2ccee4 | ||
|
|
84b4a9bcbe | ||
|
|
1742367b36 | ||
|
|
8a1d34e711 | ||
|
|
fba72498e3 | ||
|
|
c533f6a15e | ||
|
|
23a216004e | ||
|
|
7d149ed198 | ||
|
|
e8f96e4818 | ||
|
|
3ca42ae055 | ||
|
|
c0db23af90 | ||
|
|
db583df198 | ||
|
|
306bd25dd9 | ||
|
|
f98b25b719 | ||
|
|
1bc477f6b1 | ||
|
|
c37bf3d077 | ||
|
|
3a2e0b7eff | ||
|
|
38c63fc88b | ||
|
|
8ec2ebbf94 | ||
|
|
e00846776e | ||
|
|
8339d247f8 | ||
|
|
ed2522f6d2 | ||
|
|
63ef5de0e5 | ||
|
|
38d5682762 | ||
|
|
4c40219352 | ||
|
|
7eeee78c4e | ||
|
|
0760d4cc1f | ||
|
|
261a574da9 | ||
|
|
da55eb6d27 | ||
|
|
be51a55f16 | ||
|
|
b2e14711ac | ||
|
|
1059c170d1 | ||
|
|
08465a531d | ||
|
|
58e0b95cf6 | ||
|
|
7b5e8fa603 | ||
|
|
c70993ce75 | ||
|
|
aa6e7cba30 | ||
|
|
4529ced3f2 | ||
|
|
509564819a | ||
|
|
24d0e4fcf8 | ||
|
|
308c24caf4 | ||
|
|
10b076562f | ||
|
|
701c047a0a | ||
|
|
fa30e28335 | ||
|
|
5b964ef502 | ||
|
|
b0eebc2e45 | ||
|
|
7b2f65a965 | ||
|
|
0dc12d8791 | ||
|
|
88b9514090 | ||
|
|
e5d7b545c9 | ||
|
|
c4f81b019e | ||
|
|
528af8759d | ||
|
|
c34e9c046b | ||
|
|
baeabdd668 | ||
|
|
1de2300099 | ||
|
|
53e8056450 | ||
|
|
5773876cbc | ||
|
|
ed1f05e674 | ||
|
|
98f3e15d87 | ||
|
|
95c152420c | ||
|
|
bdb2b5cce8 | ||
|
|
22ccbd5556 | ||
|
|
81d9ec71d9 | ||
|
|
45e3f8ab3a | ||
|
|
5b40c745f3 | ||
|
|
69addf056b | ||
|
|
34d5df69a5 | ||
|
|
d160142945 | ||
|
|
8234956a61 | ||
|
|
225bed9990 | ||
|
|
7f203f5491 | ||
|
|
add39f7401 | ||
|
|
ca0c3a028d | ||
|
|
b08a642377 | ||
|
|
37ace77734 | ||
|
|
8645144231 | ||
|
|
47df8d6d8e | ||
|
|
f9b58b7b90 | ||
|
|
b957555c82 | ||
|
|
d40733d447 | ||
|
|
1f5da8699d | ||
|
|
fcd422c6ce | ||
|
|
5eecdb8c9c | ||
|
|
3b0084025a | ||
|
|
8f4cbf1d9f | ||
|
|
0dba54a4b8 | ||
|
|
61c9355ffb | ||
|
|
0830a5bd85 | ||
|
|
1054fd2d05 | ||
|
|
f03839b70c | ||
|
|
0076b1b9a0 | ||
|
|
d3ab9faede | ||
|
|
ee2c1ef195 | ||
|
|
57a2f1b339 | ||
|
|
d93d1653db | ||
|
|
140589fc2d | ||
|
|
1216da38d1 | ||
|
|
5b43d7a87a | ||
|
|
87e063593a | ||
|
|
23827d6c57 | ||
|
|
e966b474b4 | ||
|
|
1388c077ea | ||
|
|
4d1a5c6ffc | ||
|
|
1586cd3992 | ||
|
|
4db29ce322 | ||
|
|
243dfa7a93 | ||
|
|
d9d3a4a645 | ||
|
|
b13360d2d0 | ||
|
|
13cf5d29de | ||
|
|
1257ee09f2 | ||
|
|
e3173c955d | ||
|
|
69382c4c13 | ||
|
|
0b84afd67a | ||
|
|
6f947380cb | ||
|
|
160c535fd7 | ||
|
|
377074416e | ||
|
|
932edeb1c1 | ||
|
|
d3ad823d97 | ||
|
|
b637b5b75a | ||
|
|
eb8cedc497 | ||
|
|
ba854d12c8 | ||
|
|
9e03a130c2 | ||
|
|
dee0fa6724 | ||
|
|
84c434c279 | ||
|
|
f8898bc722 | ||
|
|
2b7da4738c | ||
|
|
11a702667d | ||
|
|
11ec903131 | ||
|
|
e57c06c610 | ||
|
|
984641e46c | ||
|
|
477d48e9da | ||
|
|
ddb54d1924 | ||
|
|
c6bd548413 | ||
|
|
af6d0ec107 | ||
|
|
e693f71775 | ||
|
|
0ff1c95c3d | ||
|
|
b5bc3a4ca3 | ||
|
|
b587a72eb6 | ||
|
|
8e73a2e0d6 | ||
|
|
e373284934 | ||
|
|
b5a9a1b6bf | ||
|
|
13c8f0a230 | ||
|
|
f733c7f207 | ||
|
|
d3c423f7ce | ||
|
|
52f68dac33 | ||
|
|
f984871b23 | ||
|
|
f09cd9e477 | ||
|
|
d6f21b24da | ||
|
|
34b2f72ae8 | ||
|
|
e6bdd2303d | ||
|
|
a9a68151ec | ||
|
|
f586dbc3e1 | ||
|
|
5fb5ef1974 | ||
|
|
54028f4e7e | ||
|
|
e8b83bef41 | ||
|
|
78b22c4a82 | ||
|
|
e252414263 | ||
|
|
320db21d5c | ||
|
|
c253d73d11 | ||
|
|
08fdc8a5bd | ||
|
|
9cc0bb831a | ||
|
|
a5a00e9cef | ||
|
|
4134cbfc9c | ||
|
|
58379a5e28 | ||
|
|
aae1689a27 | ||
|
|
4338f632f6 | ||
|
|
fa0cc6f2c8 | ||
|
|
12df5de43c | ||
|
|
4da7668dfc | ||
|
|
9c29e56fc3 | ||
|
|
e253590c1c | ||
|
|
43b5216002 | ||
|
|
e7adacc541 | ||
|
|
fa52712e35 | ||
|
|
36093c0f64 | ||
|
|
02d8f52426 | ||
|
|
5b22e19ec9 | ||
|
|
99d22649a2 | ||
|
|
98548e15c5 | ||
|
|
f37f89dd07 | ||
|
|
ed37604bc2 | ||
|
|
e284ad62b2 | ||
|
|
d28c0159ab | ||
|
|
e40ecae681 | ||
|
|
1e142aa628 | ||
|
|
6586e67a5c | ||
|
|
d9b3366a5c | ||
|
|
61969f5c84 | ||
|
|
2a4737147f | ||
|
|
a909f0ddb8 | ||
|
|
25cdd4af8e | ||
|
|
be7e46300c | ||
|
|
9ba07a2afb | ||
|
|
a39d15d685 | ||
|
|
d424c2eb20 | ||
|
|
c8c8f0d02d | ||
|
|
8221f1f193 | ||
|
|
c83952571f | ||
|
|
18a8efed5f | ||
|
|
82dc2a8c98 | ||
|
|
001ae19b26 | ||
|
|
c003dcded9 | ||
|
|
7aa8f2c73c | ||
|
|
41837eb31d | ||
|
|
860a537f30 | ||
|
|
33fd88507d | ||
|
|
d8bf66a6c9 | ||
|
|
2065d81bb4 | ||
|
|
7994e2594a | ||
|
|
baa6fda3e0 | ||
|
|
fb33be78dd | ||
|
|
db3637fe84 | ||
|
|
ee0a226388 | ||
|
|
5cd269411d | ||
|
|
cb679a6aba | ||
|
|
ad1ef877c0 | ||
|
|
c5ba0b8f8c | ||
|
|
365c6b3a83 | ||
|
|
a504a10b52 | ||
|
|
caf35d0ad7 | ||
|
|
b718cf729a | ||
|
|
489feb4e01 | ||
|
|
89c3758bae | ||
|
|
4bde890eaa | ||
|
|
ee10a4b173 | ||
|
|
6f375306c2 | ||
|
|
98f8f7b89f | ||
|
|
7028fbe288 | ||
|
|
07384edb2d | ||
|
|
12e685bd92 | ||
|
|
6dd05ca4da | ||
|
|
a1c7a44fa0 | ||
|
|
cb9e3b43f9 | ||
|
|
011c8c74d9 | ||
|
|
38e37a4dfa | ||
|
|
607b674c57 | ||
|
|
fa3b43a970 | ||
|
|
bf0db2287b | ||
|
|
339074a66e | ||
|
|
c568ac4d64 | ||
|
|
3d7786e185 | ||
|
|
9b12b86053 | ||
|
|
84817b0124 | ||
|
|
5624fa0c5e | ||
|
|
10434f5ee3 | ||
|
|
e32e3ddf70 | ||
|
|
70e6428c1f | ||
|
|
9dc1294ec5 | ||
|
|
e81858c0dc | ||
|
|
8035b3f24a | ||
|
|
d201e4a039 | ||
|
|
e999b5715a | ||
|
|
3fb6fba0f0 | ||
|
|
e21735b037 | ||
|
|
e553b8c590 | ||
|
|
4d83bf2135 | ||
|
|
385fd91e70 | ||
|
|
2d666caaf2 | ||
|
|
c61cb1bdcd | ||
|
|
eedb2854ec | ||
|
|
1cb51b5c71 | ||
|
|
48d4c8733d | ||
|
|
302bdfd628 | ||
|
|
cc6ef7b8f5 | ||
|
|
50738f28e9 | ||
|
|
8b8da33ffc | ||
|
|
17fa0d2baf | ||
|
|
3f8420b0e9 | ||
|
|
ddc7e86e6c | ||
|
|
8a77062888 | ||
|
|
e3b43243cc | ||
|
|
61a4228e6b | ||
|
|
f0a2098826 | ||
|
|
a624a57bfb | ||
|
|
0af8377844 | ||
|
|
e4f855b64a | ||
|
|
16b80a2f1b | ||
|
|
21b8445753 | ||
|
|
63432c2acc | ||
|
|
03f98af60b | ||
|
|
852a12db61 | ||
|
|
b804a70469 | ||
|
|
924d155012 | ||
|
|
604418d699 | ||
|
|
b9f6cb8800 | ||
|
|
f2de498d61 | ||
|
|
55da83d0c0 | ||
|
|
1d8719b474 | ||
|
|
3647b17110 | ||
|
|
533a94267a | ||
|
|
ecb9646ccb | ||
|
|
162b11dcc5 | ||
|
|
93a4f19b40 | ||
|
|
92d8ee1a36 | ||
|
|
4b8146dd00 | ||
|
|
abc906186e | ||
|
|
564c1a3650 | ||
|
|
c44f9d2537 | ||
|
|
7e932f091d | ||
|
|
2c9697ff4e | ||
|
|
6bfe1be045 | ||
|
|
efaf728737 | ||
|
|
ddcfe1535a | ||
|
|
9e0b97dc9c | ||
|
|
245db8971a | ||
|
|
0586a71071 | ||
|
|
2146a55c3b | ||
|
|
a0254f30cd | ||
|
|
7a498362b3 | ||
|
|
cfbfe8416f | ||
|
|
1b0897d53a | ||
|
|
9d1ca6eaca | ||
|
|
39a062e90a | ||
|
|
af5eec7094 | ||
|
|
668bffcd84 | ||
|
|
02d093f6b6 | ||
|
|
383f7c57aa | ||
|
|
10133a13f2 | ||
|
|
8838a89ecc | ||
|
|
cf94d67caf | ||
|
|
97e53900ad | ||
|
|
9fc7908af5 | ||
|
|
7bc118b598 | ||
|
|
1d837c32ee | ||
|
|
e5ca494db8 | ||
|
|
5de9eed48a | ||
|
|
fe739f6a8d | ||
|
|
02be661163 | ||
|
|
22ae668c74 | ||
|
|
fc69adb135 | ||
|
|
4e4175ee4c | ||
|
|
aa04da48f3 | ||
|
|
a2d875655c | ||
|
|
6a610ff7a4 | ||
|
|
5d3adc0bdb | ||
|
|
6a3f6e7bfa | ||
|
|
d043de08cd | ||
|
|
858beb97c5 | ||
|
|
379bad9f46 | ||
|
|
041d9814a7 | ||
|
|
c66ac0827e | ||
|
|
419402c554 | ||
|
|
93f0a7c58d | ||
|
|
38316bae3f | ||
|
|
bd4debe91b | ||
|
|
08eaff1c24 | ||
|
|
547fcf49e0 | ||
|
|
3a813cb612 | ||
|
|
da57e04a50 | ||
|
|
ba2d5548ff | ||
|
|
a4e5e49a08 | ||
|
|
027976626c | ||
|
|
9f56494c4c | ||
|
|
ab37cd2577 | ||
|
|
559f7afc60 | ||
|
|
ef418c7f50 | ||
|
|
c80255e9ab | ||
|
|
7b994adc23 | ||
|
|
f8ec0d316a | ||
|
|
7040e4baae | ||
|
|
fed3ae9e85 | ||
|
|
89ae77dfd9 | ||
|
|
7bf6881cb2 | ||
|
|
ed1a06495b | ||
|
|
e5d2e5010b | ||
|
|
3760a34b2b | ||
|
|
26bb1a9beb | ||
|
|
d59dea29ab | ||
|
|
78b4a35d12 | ||
|
|
7fc37e4737 | ||
|
|
2214c83ec7 | ||
|
|
d10719330d | ||
|
|
38efa218d0 | ||
|
|
8c747f02b5 | ||
|
|
6c625297f2 | ||
|
|
8a47d49dfc | ||
|
|
d5a7e907a3 | ||
|
|
6ecf896fa2 | ||
|
|
6dd989484a | ||
|
|
a37820a963 | ||
|
|
f90e7d3239 | ||
|
|
08f0011244 | ||
|
|
3e231da472 | ||
|
|
064e3c426e | ||
|
|
f0b80b47f1 | ||
|
|
22a6661b51 | ||
|
|
7f1fc56f78 | ||
|
|
3cac9c452f | ||
|
|
57ec7bb9a9 | ||
|
|
8b5e5105a8 | ||
|
|
1833f0dd5d | ||
|
|
019e16c5ba | ||
|
|
885d489bc3 | ||
|
|
63b644551c | ||
|
|
70ce58f5e1 | ||
|
|
33d0f9fc1b | ||
|
|
00858656b5 | ||
|
|
ef0e41e624 | ||
|
|
a11696b85e | ||
|
|
9ac6de4215 | ||
|
|
bed7ec5953 | ||
|
|
1d7308bf5d | ||
|
|
4d6a21254f | ||
|
|
fa5fa9e228 | ||
|
|
36a4aab020 | ||
|
|
42a327211e | ||
|
|
88e9eb59cf | ||
|
|
65895752da | ||
|
|
8996acf314 | ||
|
|
1384140e41 | ||
|
|
1220ff8a06 | ||
|
|
f691636c75 | ||
|
|
824a29624f | ||
|
|
daa5b00a2a | ||
|
|
36f4df2931 | ||
|
|
cf40e0432a | ||
|
|
8f8a1191cb | ||
|
|
2b921542a5 | ||
|
|
ad6037ac63 | ||
|
|
43d6e49c3a | ||
|
|
53d50f16d6 | ||
|
|
7f38f1dd1c | ||
|
|
2367b73d3a | ||
|
|
23e598f2f8 | ||
|
|
7bec139987 | ||
|
|
a26266159c | ||
|
|
28d40bf27d | ||
|
|
779be7c5a0 | ||
|
|
6cba935a65 | ||
|
|
06d7665bf9 | ||
|
|
5151779f80 | ||
|
|
3dcfa810fd | ||
|
|
9b3139dba9 | ||
|
|
b2d78e7df6 | ||
|
|
dac90c8003 | ||
|
|
35117f7af4 | ||
|
|
5e39b11c2f | ||
|
|
cfe062918b | ||
|
|
8695dea0a5 | ||
|
|
792e17c385 | ||
|
|
6fbbe580c5 | ||
|
|
8a62d26af4 | ||
|
|
fee0f90a1b | ||
|
|
292d027498 | ||
|
|
a1bcdc616f | ||
|
|
17f69bd182 | ||
|
|
d45b525497 | ||
|
|
243f59c87d | ||
|
|
9e321a63c0 | ||
|
|
f986c5898e | ||
|
|
8dd2d17cd5 | ||
|
|
a0e9163d27 | ||
|
|
cc7d27b030 | ||
|
|
cbd0ace098 | ||
|
|
6884f5533e | ||
|
|
30ed6df38d | ||
|
|
240be2be0f | ||
|
|
ae88a9c2e1 | ||
|
|
af4c8bee94 | ||
|
|
44ac44e1dd | ||
|
|
4033a78887 | ||
|
|
51629cd0c0 | ||
|
|
4fc33c7da2 | ||
|
|
abfb8149d9 | ||
|
|
a1ebd18b7c | ||
|
|
0b820361de | ||
|
|
fc719230a3 | ||
|
|
49febc6333 | ||
|
|
48f1794d70 | ||
|
|
e17b609517 | ||
|
|
a25f4fdf44 | ||
|
|
831df0b222 | ||
|
|
ecd32819a6 | ||
|
|
9e4610f9bd | ||
|
|
df5b554f24 | ||
|
|
ef0d6bd4d6 | ||
|
|
f15e948085 | ||
|
|
53e6d391e3 | ||
|
|
a2c58c7ca1 | ||
|
|
0ac87b9e55 | ||
|
|
59b564c4be | ||
|
|
193580d5d9 | ||
|
|
eb846e27fd | ||
|
|
e3ed831e30 | ||
|
|
e6b1d545a3 | ||
|
|
b79b0d7586 | ||
|
|
39e3374ece | ||
|
|
1483023769 | ||
|
|
bc048a943c | ||
|
|
4414a3f287 | ||
|
|
27fdfb60af | ||
|
|
852dce2dff | ||
|
|
b050f27a84 | ||
|
|
44077a2c6f | ||
|
|
0ed97d820c | ||
|
|
9b5bfdeb00 | ||
|
|
f8e3f29d1a | ||
|
|
d844dc8e1b | ||
|
|
6c5aaef86e | ||
|
|
d8c17d160a | ||
|
|
c099711f97 | ||
|
|
d278b72289 | ||
|
|
82bc26fe90 | ||
|
|
47df106237 | ||
|
|
f70b1f4572 | ||
|
|
ed134bac84 | ||
|
|
33aad10e73 | ||
|
|
3d78b375c6 | ||
|
|
f9acee2be4 | ||
|
|
86c80124fc | ||
|
|
443e232ea4 | ||
|
|
c74c274a9e | ||
|
|
f902474591 | ||
|
|
bf72864c2b | ||
|
|
4c2552e0bf | ||
|
|
066190c16f | ||
|
|
3aea387b9a | ||
|
|
d12c486dd2 | ||
|
|
97bcbb81b9 | ||
|
|
04f661f646 | ||
|
|
c4f92fd4cc | ||
|
|
813dff8af2 | ||
|
|
db0b345241 | ||
|
|
21be27d722 | ||
|
|
3d31a37dd3 | ||
|
|
17f168ed06 | ||
|
|
de35940341 | ||
|
|
d67db76b88 | ||
|
|
5a6caa294e | ||
|
|
c4f499d518 | ||
|
|
7b75fab7a1 | ||
|
|
5149c5118b | ||
|
|
df36386757 | ||
|
|
31302fb930 | ||
|
|
d51cfccd7e | ||
|
|
79ad05d405 | ||
|
|
6d0dc438a7 | ||
|
|
ca0c677d46 | ||
|
|
276d3026c8 | ||
|
|
41970ecf07 | ||
|
|
2a9e35355e | ||
|
|
a48b992ec0 | ||
|
|
599e39ce16 | ||
|
|
d07daede68 | ||
|
|
16741598fd | ||
|
|
56a6593dd6 | ||
|
|
096962b778 | ||
|
|
2d97bc49bd | ||
|
|
da10b5decf | ||
|
|
430c6c0642 | ||
|
|
bfaefa4dc9 | ||
|
|
b43e770420 | ||
|
|
3a083723f0 | ||
|
|
ba49a5a783 | ||
|
|
4adf332480 | ||
|
|
d9d5d9cda5 | ||
|
|
a4efd3d44c | ||
|
|
6eb6a01339 | ||
|
|
388b25ddf9 | ||
|
|
e81ef564e3 | ||
|
|
e1fdd3a210 | ||
|
|
2546603a67 | ||
|
|
e81343c8e4 | ||
|
|
51f94119ff | ||
|
|
ac88817a34 | ||
|
|
2a3b3b6dd2 | ||
|
|
711f525d98 | ||
|
|
21a7942de6 | ||
|
|
b7320a0bd7 | ||
|
|
5225686d8f | ||
|
|
3e5f53b082 | ||
|
|
3595685f9a | ||
|
|
b324207121 | ||
|
|
fe3c0b8d29 | ||
|
|
02cc5adf78 | ||
|
|
02cbad2697 | ||
|
|
071ee9ab54 | ||
|
|
61fb34e738 | ||
|
|
f2c8ea9722 | ||
|
|
b6406b54b4 | ||
|
|
9ce5c45799 | ||
|
|
f1cc3a7b0d | ||
|
|
d925c2aefc | ||
|
|
7e65b3176d | ||
|
|
9645ec727b | ||
|
|
6f29a8b642 | ||
|
|
27d7b3026b | ||
|
|
c1647ccd2c | ||
|
|
28e2d4041f | ||
|
|
780ec598d6 | ||
|
|
73b53e02fc | ||
|
|
1440544b2d | ||
|
|
6300f87987 | ||
|
|
bc2223fb8e | ||
|
|
b5d4f8b781 | ||
|
|
939356ef26 | ||
|
|
4966290f87 | ||
|
|
422061f137 | ||
|
|
7e6d544180 | ||
|
|
c1d068aeb9 | ||
|
|
6a2319e16d | ||
|
|
587d06dced | ||
|
|
4a7a40425a | ||
|
|
81ec3fef60 | ||
|
|
7cb64e8804 | ||
|
|
39708d773d | ||
|
|
ec55af5b8a | ||
|
|
2abee3fcdd | ||
|
|
23a1c2a772 | ||
|
|
f394cf559c | ||
|
|
54ecdb670d | ||
|
|
68db9b9926 | ||
|
|
cb33ede9dc | ||
|
|
a8d7732a39 | ||
|
|
21ce7ab30a | ||
|
|
d89e9620ac | ||
|
|
45a7b13e9a | ||
|
|
8928e461d4 | ||
|
|
4621f625a0 | ||
|
|
5e71790cd1 | ||
|
|
b5204a4820 | ||
|
|
b84f49a1c3 | ||
|
|
8e88cd6255 | ||
|
|
c07fefde1a | ||
|
|
098d313163 | ||
|
|
a7e3b2d9df | ||
|
|
71862e00a7 | ||
|
|
68f3d0951a | ||
|
|
4feb7c893b | ||
|
|
1b62dd06b8 | ||
|
|
687fb6f0aa | ||
|
|
98961fef74 | ||
|
|
8b070fddbb | ||
|
|
8af6866ae4 | ||
|
|
146797ea61 | ||
|
|
8bd5a36aaf | ||
|
|
a64a501dbb | ||
|
|
0a90a48b04 | ||
|
|
540687515e | ||
|
|
62c6530ca9 | ||
|
|
f78826c9c7 | ||
|
|
2f602f2a57 | ||
|
|
fa543fed63 | ||
|
|
235c463849 | ||
|
|
ff493c21d4 | ||
|
|
d0b7b4ee50 | ||
|
|
339f3fc2f0 | ||
|
|
d8d803546b | ||
|
|
6d80d91873 | ||
|
|
7c4e9e5838 | ||
|
|
f756749e02 | ||
|
|
3bcd3257a1 | ||
|
|
fbedff4eca | ||
|
|
af7e3380d3 | ||
|
|
0c65d1ddd8 | ||
|
|
378a703cc3 | ||
|
|
fe41430d1e | ||
|
|
1ec329284c | ||
|
|
b7a88fd03b | ||
|
|
5f188650d8 | ||
|
|
c98e44c5a1 | ||
|
|
0c0c98a0b0 | ||
|
|
6d39cc39c6 | ||
|
|
a0a61b65cb | ||
|
|
5d20b4fb51 | ||
|
|
3621c34bd5 | ||
|
|
eba636c929 | ||
|
|
0d0eb6117f | ||
|
|
6df8f73bb0 | ||
|
|
b0207f2b49 | ||
|
|
920d3bb974 | ||
|
|
0d5d015d88 | ||
|
|
52d5b8936e | ||
|
|
c91eb9f345 | ||
|
|
44508f0f1e | ||
|
|
1738db9e1f | ||
|
|
f7387048b0 | ||
|
|
92cfcb8fc9 | ||
|
|
614f83799e | ||
|
|
d39b62aa31 | ||
|
|
ec3e158781 | ||
|
|
d5e51dada6 | ||
|
|
23e774bede | ||
|
|
83d248469f | ||
|
|
0ad3d8f351 | ||
|
|
2be005d344 | ||
|
|
79808acd9f | ||
|
|
dcb07237d8 | ||
|
|
381fb6291e | ||
|
|
e3b9ce4d80 | ||
|
|
fb557dd682 | ||
|
|
4438cbd5d0 | ||
|
|
ec6b0f873e | ||
|
|
92d830b884 | ||
|
|
e551a6b9f5 | ||
|
|
5b73b80e81 | ||
|
|
ccd66bba9c | ||
|
|
aa8457c40f | ||
|
|
3dd3cfa7ec | ||
|
|
295ee47c3a | ||
|
|
c9a8d7efa5 | ||
|
|
e070168c4a | ||
|
|
667d1c5428 | ||
|
|
f5db1cd921 | ||
|
|
262a8e75f9 | ||
|
|
81b688f0e8 | ||
|
|
698d36180d | ||
|
|
6992d66202 | ||
|
|
f9435a3c34 | ||
|
|
59adf88cad | ||
|
|
48896ab3d8 | ||
|
|
668c6ff74f | ||
|
|
da0810382b | ||
|
|
90e627ad60 | ||
|
|
7e50cc9ce8 | ||
|
|
5e081ce3ee | ||
|
|
2a4f3f9ae4 | ||
|
|
ed48b691e1 | ||
|
|
30141bd488 | ||
|
|
e16e3fba40 | ||
|
|
69ab113201 | ||
|
|
7192f12a49 | ||
|
|
ec6962ea2c | ||
|
|
8a390dd237 | ||
|
|
5290d0be6b | ||
|
|
6cd7fbb455 | ||
|
|
8ccf527e01 | ||
|
|
d2ec4fcf88 | ||
|
|
8fa293f561 | ||
|
|
b58306aad8 | ||
|
|
2a2f8f3531 | ||
|
|
16ab8f04c3 | ||
|
|
db19303f1a | ||
|
|
2c22d4e774 | ||
|
|
5fe31e6333 |
@@ -1,6 +1,9 @@
|
||||
engines:
|
||||
rubocop:
|
||||
enabled: true
|
||||
exclude_fingerprints:
|
||||
- ac41db8d4ec4cbf508c353d9b65a024f
|
||||
- 8e3b6322aef5be9f38700b3fd0cd347e
|
||||
scss-lint:
|
||||
enabled: true
|
||||
ratings:
|
||||
|
||||
1
.gitignore
vendored
@@ -39,3 +39,4 @@ NERD_tree*
|
||||
coverage
|
||||
libpeerconnection.log
|
||||
/config/application.yml
|
||||
node_modules
|
||||
|
||||
17
.travis.yml
@@ -26,23 +26,26 @@ before_script:
|
||||
- cp config/database.travis.yml config/database.yml
|
||||
- cp config/application.yml.example config/application.yml
|
||||
- RAILS_ENV=test bundle exec rake db:create db:schema:load
|
||||
|
||||
# Only install PhantomJS if it is not already present (ie. cached)
|
||||
- npm list -g phantomjs-prebuilt@~2.1.7 --depth=0 || npm install -g phantomjs-prebuilt@~2.1.7
|
||||
- export PATH=`npm bin -g`:$PATH
|
||||
|
||||
- >
|
||||
if [ "$KARMA" = "true" ]; then
|
||||
npm install karma@0.12.31
|
||||
npm install karma-jasmine@0.1.5
|
||||
npm install karma-phantomjs-launcher@0.1.4
|
||||
npm install karma-coffee-preprocessor@0.2.1
|
||||
npm install -g karma-cli@0.0.4
|
||||
npm install -g npm@'3.8.8'
|
||||
npm install
|
||||
npm install -g karma-cli@0.1.2
|
||||
fi
|
||||
|
||||
script:
|
||||
- 'if [ "$KARMA" = "true" ]; then bundle exec rake karma:run; else echo "Skipping karma run"; fi'
|
||||
#- "KNAPSACK_GENERATE_REPORT=true bundle exec rspec spec"
|
||||
- "bundle exec rake knapsack:rspec"
|
||||
- "bundle exec rake 'knapsack:rspec[--tag ~performance]'"
|
||||
|
||||
after_success:
|
||||
- >
|
||||
if [ "$GITHUB_DEPLOY" = "true" -a "$TRAVIS_PULL_REQUEST" = "false" -a -n "$TRAVIS_BRANCH" -a -n "$GITHUB_API_SECRET" ]; then
|
||||
if [ "$GITHUB_DEPLOY" = "true" -a "$TRAVIS_PULL_REQUEST" = "false" -a -n "$TRAVIS_BRANCH" -a "$TRAVIS_BRANCH" != "transifex" -a -n "$GITHUB_API_SECRET" ]; then
|
||||
description="`git show "$TRAVIS_BRANCH" -s --oneline --no-color`"
|
||||
data="{
|
||||
\"ref\":\"$TRAVIS_BRANCH\",
|
||||
|
||||
21
Gemfile
@@ -5,28 +5,29 @@ gem 'rails', '3.2.21'
|
||||
gem 'rails-i18n', '~> 3.0.0'
|
||||
gem 'i18n', '~> 0.6.11'
|
||||
|
||||
gem 'nokogiri'
|
||||
# Patched version. See http://rubysec.com/advisories/CVE-2015-5312/.
|
||||
gem 'nokogiri', '>= 1.6.7.1'
|
||||
|
||||
gem 'pg'
|
||||
gem 'spree', github: 'openfoodfoundation/spree', branch: '1-3-stable'
|
||||
gem 'spree', github: 'openfoodfoundation/spree', branch: 'spree-upgrade-step1c'
|
||||
gem 'spree_i18n', github: 'spree/spree_i18n', branch: '1-3-stable'
|
||||
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '1-3-stable'
|
||||
|
||||
# Waiting on merge of PR #117
|
||||
# https://github.com/spree-contrib/better_spree_paypal_express/pull/117
|
||||
gem 'spree_paypal_express', :github => "openfoodfoundation/better_spree_paypal_express", :branch => "1-3-stable"
|
||||
# Our branch contains two changes
|
||||
# - Pass customer email and phone number to PayPal (merged to upstream master)
|
||||
# - Change type of password from string to password to hide it in the form
|
||||
gem 'spree_paypal_express', :github => "openfoodfoundation/better_spree_paypal_express", :branch => "hide-password"
|
||||
#gem 'spree_paypal_express', :github => "spree-contrib/better_spree_paypal_express", :branch => "1-3-stable"
|
||||
|
||||
gem 'delayed_job_active_record'
|
||||
gem 'daemons'
|
||||
gem 'comfortable_mexican_sofa'
|
||||
|
||||
# Fix bug in simple_form preventing collection_check_boxes usage within form_for block
|
||||
# When merged, revert to upstream gem
|
||||
gem 'simple_form', :github => 'RohanM/simple_form'
|
||||
|
||||
gem 'unicorn'
|
||||
gem 'angularjs-rails', '1.2.13'
|
||||
gem 'angularjs-rails', '1.5.5'
|
||||
gem 'bugsnag'
|
||||
gem 'newrelic_rpm'
|
||||
gem 'haml'
|
||||
@@ -49,18 +50,20 @@ gem 'gmaps4rails'
|
||||
gem 'spinjs-rails'
|
||||
gem 'rack-ssl', :require => 'rack/ssl'
|
||||
gem 'custom_error_message', :github => 'jeremydurham/custom-err-msg'
|
||||
gem 'angularjs-file-upload-rails', '~> 1.1.0'
|
||||
gem 'angularjs-file-upload-rails', '~> 1.1.6'
|
||||
gem 'roadie-rails', '~> 1.0.3'
|
||||
gem 'figaro'
|
||||
gem 'blockenspiel'
|
||||
gem 'acts-as-taggable-on', '~> 3.4'
|
||||
gem 'paper_trail', '~> 3.0.8'
|
||||
gem 'diffy'
|
||||
|
||||
gem 'wicked_pdf'
|
||||
gem 'wkhtmltopdf-binary'
|
||||
|
||||
gem 'foreigner'
|
||||
gem 'immigrant'
|
||||
gem 'roo', '~> 2.7.0'
|
||||
|
||||
gem 'whenever', require: false
|
||||
|
||||
@@ -85,8 +88,10 @@ gem "foundation-rails"
|
||||
gem 'foundation_rails_helper', github: 'willrjmarshall/foundation_rails_helper', branch: "rails3"
|
||||
|
||||
gem 'jquery-rails'
|
||||
gem 'jquery-migrate-rails'
|
||||
gem 'css_splitter'
|
||||
|
||||
gem 'ofn-qz', github: 'openfoodfoundation/ofn-qz'
|
||||
|
||||
group :test, :development do
|
||||
# Pretty printed test output
|
||||
|
||||
160
Gemfile.lock
@@ -14,54 +14,64 @@ GIT
|
||||
|
||||
GIT
|
||||
remote: git://github.com/openfoodfoundation/better_spree_paypal_express.git
|
||||
revision: cdd61161ccd27cd8d183f9321422c7be113796b8
|
||||
branch: 1-3-stable
|
||||
revision: 840d973cd5bd3250b17674a624dad494aeb09eb3
|
||||
branch: hide-password
|
||||
specs:
|
||||
spree_paypal_express (2.0.3)
|
||||
paypal-sdk-merchant (= 1.106.1)
|
||||
spree_core (~> 1.3.4)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/openfoodfoundation/spree.git
|
||||
revision: 6e3edfe40a5de8eba0095b2c5f3db9ea54c3afda
|
||||
branch: 1-3-stable
|
||||
remote: git://github.com/openfoodfoundation/ofn-qz.git
|
||||
revision: 024680ccea429b2e5428d7b964fa67c52add34ec
|
||||
specs:
|
||||
spree (1.3.6.beta)
|
||||
spree_api (= 1.3.6.beta)
|
||||
spree_cmd (= 1.3.6.beta)
|
||||
spree_core (= 1.3.6.beta)
|
||||
spree_promo (= 1.3.6.beta)
|
||||
spree_sample (= 1.3.6.beta)
|
||||
spree_api (1.3.6.beta)
|
||||
spree_core (= 1.3.6.beta)
|
||||
ofn-qz (0.1.0)
|
||||
railties (~> 3.1)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/openfoodfoundation/spree.git
|
||||
revision: a4c439570b77afa50f9e36299811f293232bd281
|
||||
branch: spree-upgrade-step1c
|
||||
specs:
|
||||
spree (1.3.99)
|
||||
spree_api (= 1.3.99)
|
||||
spree_cmd (= 1.3.99)
|
||||
spree_core (= 1.3.99)
|
||||
spree_dash (= 1.3.99)
|
||||
spree_promo (= 1.3.99)
|
||||
spree_sample (= 1.3.99)
|
||||
spree_api (1.3.99)
|
||||
spree_core (= 1.3.99)
|
||||
versioncake (= 0.4.0)
|
||||
spree_cmd (1.3.6.beta)
|
||||
spree_cmd (1.3.99)
|
||||
thor (>= 0.14.6)
|
||||
spree_core (1.3.6.beta)
|
||||
activemerchant (~> 1.34)
|
||||
spree_core (1.3.99)
|
||||
activemerchant (~> 1.50.0)
|
||||
acts_as_list (= 0.1.4)
|
||||
awesome_nested_set (= 2.1.5)
|
||||
aws-sdk (~> 1.11.1)
|
||||
cancan (= 1.6.8)
|
||||
deface (>= 0.9.0)
|
||||
ffaker (~> 1.15.0)
|
||||
highline (= 1.6.18)
|
||||
jquery-rails (~> 2.2.0)
|
||||
highline (= 1.6.11)
|
||||
jquery-rails (~> 2.0)
|
||||
json (>= 1.5.5)
|
||||
kaminari (= 0.14.1)
|
||||
money (= 5.1.1)
|
||||
kaminari (= 0.13.0)
|
||||
money (= 5.0.0)
|
||||
paperclip (~> 3.0)
|
||||
rabl (= 0.7.2)
|
||||
rails (~> 3.2.16)
|
||||
rails (~> 3.2.13)
|
||||
ransack (= 0.7.2)
|
||||
select2-rails (= 3.5.9.3)
|
||||
state_machine (= 1.1.2)
|
||||
select2-rails (~> 3.2)
|
||||
state_machine (= 1.2.0)
|
||||
stringex (~> 1.3.2)
|
||||
truncate_html (~> 0.5.5)
|
||||
spree_promo (1.3.6.beta)
|
||||
spree_core (= 1.3.6.beta)
|
||||
spree_sample (1.3.6.beta)
|
||||
spree_core (= 1.3.6.beta)
|
||||
spree_dash (1.3.99)
|
||||
httparty (~> 0.8.1)
|
||||
spree_core (= 1.3.99)
|
||||
spree_promo (1.3.99)
|
||||
spree_core (= 1.3.99)
|
||||
spree_sample (1.3.99)
|
||||
spree_core (= 1.3.99)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/spree/deface.git
|
||||
@@ -121,11 +131,10 @@ GEM
|
||||
rack-cache (~> 1.2)
|
||||
rack-test (~> 0.6.1)
|
||||
sprockets (~> 2.2.1)
|
||||
active_link_to (1.0.0)
|
||||
active_model_serializers (0.8.3)
|
||||
activemodel (>= 3.0)
|
||||
activemerchant (1.57.0)
|
||||
activesupport (>= 3.2.14, < 5.1)
|
||||
activemerchant (1.50.0)
|
||||
activesupport (>= 3.2.14, < 5.0.0)
|
||||
builder (>= 2.1.2, < 4.0.0)
|
||||
i18n (>= 0.6.9)
|
||||
nokogiri (~> 1.4)
|
||||
@@ -152,8 +161,8 @@ GEM
|
||||
railties (>= 3.1)
|
||||
sprockets (~> 2)
|
||||
tilt
|
||||
angularjs-file-upload-rails (1.1.0)
|
||||
angularjs-rails (1.2.13)
|
||||
angularjs-file-upload-rails (1.1.6)
|
||||
angularjs-rails (1.5.5)
|
||||
ansi (1.4.2)
|
||||
arel (3.0.3)
|
||||
atomic (1.1.99)
|
||||
@@ -168,15 +177,14 @@ GEM
|
||||
bcrypt-ruby (3.1.5)
|
||||
bcrypt (>= 3.1.3)
|
||||
blockenspiel (0.4.5)
|
||||
bugsnag (1.5.2)
|
||||
httparty (>= 0.6, < 1.0)
|
||||
multi_json (~> 1.0)
|
||||
bugsnag (4.1.0)
|
||||
builder (3.0.4)
|
||||
byebug (2.7.0)
|
||||
columnize (~> 0.3)
|
||||
debugger-linecache (~> 1.2)
|
||||
cancan (1.6.8)
|
||||
capybara (2.5.0)
|
||||
capybara (2.7.1)
|
||||
addressable
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
@@ -189,7 +197,7 @@ GEM
|
||||
climate_control (0.0.3)
|
||||
activesupport (>= 3.0)
|
||||
cliver (0.3.2)
|
||||
cocaine (0.5.7)
|
||||
cocaine (0.5.8)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
coderay (1.0.9)
|
||||
coffee-rails (3.2.2)
|
||||
@@ -201,10 +209,6 @@ GEM
|
||||
coffee-script-source (1.10.0)
|
||||
colorize (0.7.7)
|
||||
columnize (0.9.0)
|
||||
comfortable_mexican_sofa (1.6.24)
|
||||
active_link_to (~> 1.0.0)
|
||||
paperclip (>= 2.3.0)
|
||||
rails (>= 3.0.0)
|
||||
compass (1.0.3)
|
||||
chunky_png (~> 1.2)
|
||||
compass-core (~> 1.0.2)
|
||||
@@ -225,7 +229,7 @@ GEM
|
||||
safe_yaml (~> 0.9.0)
|
||||
css_parser (1.3.5)
|
||||
addressable
|
||||
css_splitter (0.4.1)
|
||||
css_splitter (0.4.5)
|
||||
sprockets (>= 2.0.0)
|
||||
daemons (1.2.2)
|
||||
dalli (2.7.2)
|
||||
@@ -248,6 +252,7 @@ GEM
|
||||
devise-encryptable (0.1.2)
|
||||
devise (>= 2.1.0)
|
||||
diff-lcs (1.2.4)
|
||||
diffy (3.1.0)
|
||||
em-websocket (0.5.0)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.5.3)
|
||||
@@ -407,12 +412,12 @@ GEM
|
||||
zeus
|
||||
haml (4.0.4)
|
||||
tilt
|
||||
highline (1.6.18)
|
||||
highline (1.6.11)
|
||||
hike (1.2.3)
|
||||
http_parser.rb (0.5.3)
|
||||
httparty (0.13.1)
|
||||
json (~> 1.8)
|
||||
multi_xml (>= 0.5.2)
|
||||
httparty (0.8.3)
|
||||
multi_json (~> 1.0)
|
||||
multi_xml
|
||||
i18n (0.6.11)
|
||||
immigrant (0.1.6)
|
||||
activerecord (>= 3.0)
|
||||
@@ -420,16 +425,18 @@ GEM
|
||||
inflecto (0.0.2)
|
||||
ipaddress (0.8.0)
|
||||
journey (1.0.4)
|
||||
jquery-rails (2.2.2)
|
||||
jquery-migrate-rails (1.2.1)
|
||||
jquery-rails (2.3.0)
|
||||
railties (>= 3.0, < 5.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
json (1.8.3)
|
||||
json_spec (1.1.1)
|
||||
multi_json (~> 1.0)
|
||||
rspec (~> 2.0)
|
||||
kaminari (0.14.1)
|
||||
kaminari (0.13.0)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
railties (>= 3.0.0)
|
||||
kgio (2.9.3)
|
||||
knapsack (1.5.1)
|
||||
rake
|
||||
@@ -449,16 +456,17 @@ GEM
|
||||
treetop (~> 1.4.8)
|
||||
method_source (0.8.2)
|
||||
mime-types (1.25.1)
|
||||
mini_portile (0.6.2)
|
||||
mini_portile2 (2.0.0)
|
||||
momentjs-rails (2.5.1)
|
||||
railties (>= 3.1)
|
||||
money (5.1.1)
|
||||
i18n (~> 0.6.0)
|
||||
multi_json (1.11.2)
|
||||
money (5.0.0)
|
||||
i18n (~> 0.4)
|
||||
json
|
||||
multi_json (1.12.1)
|
||||
multi_xml (0.5.5)
|
||||
newrelic_rpm (3.12.0.288)
|
||||
nokogiri (1.6.6.4)
|
||||
mini_portile (~> 0.6.0)
|
||||
nokogiri (1.6.7.2)
|
||||
mini_portile2 (~> 2.0.0.rc2)
|
||||
oj (2.1.2)
|
||||
orm_adapter (0.5.0)
|
||||
paper_trail (3.0.8)
|
||||
@@ -478,7 +486,7 @@ GEM
|
||||
paypal-sdk-merchant (1.106.1)
|
||||
paypal-sdk-core (~> 0.2.3)
|
||||
pg (0.13.2)
|
||||
poltergeist (1.7.0)
|
||||
poltergeist (1.9.0)
|
||||
capybara (~> 2.1)
|
||||
cliver (~> 0.3.1)
|
||||
multi_json (~> 1.0)
|
||||
@@ -497,7 +505,7 @@ GEM
|
||||
activesupport (>= 2.3.14)
|
||||
multi_json (~> 1.0)
|
||||
rack (1.4.7)
|
||||
rack-cache (1.2)
|
||||
rack-cache (1.6.1)
|
||||
rack (>= 0.4)
|
||||
rack-livereload (0.3.15)
|
||||
rack
|
||||
@@ -524,7 +532,7 @@ GEM
|
||||
rdoc (~> 3.4)
|
||||
thor (>= 0.14.6, < 2.0)
|
||||
raindrops (0.13.0)
|
||||
rake (10.4.2)
|
||||
rake (11.1.2)
|
||||
ransack (0.7.2)
|
||||
actionpack (~> 3.0)
|
||||
activerecord (~> 3.0)
|
||||
@@ -550,6 +558,9 @@ GEM
|
||||
roadie-rails (1.0.3)
|
||||
rails (>= 3.0, < 4.2)
|
||||
roadie (~> 3.0)
|
||||
roo (2.7.1)
|
||||
nokogiri (~> 1)
|
||||
rubyzip (~> 1.1, < 2.0.0)
|
||||
rspec (2.14.1)
|
||||
rspec-core (~> 2.14.0)
|
||||
rspec-expectations (~> 2.14.0)
|
||||
@@ -568,13 +579,14 @@ GEM
|
||||
rspec-retry (0.4.2)
|
||||
rspec-core
|
||||
ruby-progressbar (1.7.1)
|
||||
rubyzip (1.2.0)
|
||||
safe_yaml (0.9.5)
|
||||
sass (3.3.14)
|
||||
sass-rails (3.2.6)
|
||||
railties (~> 3.2.0)
|
||||
sass (>= 3.1.10)
|
||||
tilt (~> 1.3)
|
||||
select2-rails (3.5.9.3)
|
||||
select2-rails (3.5.10)
|
||||
thor (~> 0.14)
|
||||
shoulda-matchers (1.1.0)
|
||||
activesupport (>= 3.0.0)
|
||||
@@ -586,14 +598,14 @@ GEM
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
state_machine (1.1.2)
|
||||
state_machine (1.2.0)
|
||||
stringex (1.3.3)
|
||||
therubyracer (0.12.0)
|
||||
libv8 (~> 3.16.14.0)
|
||||
ref
|
||||
thor (0.19.1)
|
||||
tilt (1.4.1)
|
||||
timecop (0.6.2.2)
|
||||
timecop (0.8.1)
|
||||
timers (1.1.0)
|
||||
treetop (1.4.15)
|
||||
polyglot
|
||||
@@ -604,7 +616,7 @@ GEM
|
||||
sprockets (>= 2.0.0)
|
||||
turn (0.8.3)
|
||||
ansi
|
||||
tzinfo (0.3.44)
|
||||
tzinfo (0.3.49)
|
||||
uglifier (2.7.1)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
@@ -625,15 +637,14 @@ GEM
|
||||
webmock (1.13.0)
|
||||
addressable (>= 2.2.7)
|
||||
crack (>= 0.3.2)
|
||||
websocket-driver (0.6.2)
|
||||
websocket-driver (0.6.3)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.2)
|
||||
whenever (0.9.2)
|
||||
activesupport (>= 2.3.4)
|
||||
chronic (>= 0.6.3)
|
||||
wicked_pdf (0.11.0)
|
||||
rails
|
||||
wkhtmltopdf-binary (0.9.9.3)
|
||||
wicked_pdf (1.1.0)
|
||||
wkhtmltopdf-binary (0.12.3.1)
|
||||
xml-simple (1.1.4)
|
||||
xpath (2.0.0)
|
||||
nokogiri (~> 1.3)
|
||||
@@ -648,8 +659,8 @@ DEPENDENCIES
|
||||
acts-as-taggable-on (~> 3.4)
|
||||
andand
|
||||
angular-rails-templates (~> 0.2.0)
|
||||
angularjs-file-upload-rails (~> 1.1.0)
|
||||
angularjs-rails (= 1.2.13)
|
||||
angularjs-file-upload-rails (~> 1.1.6)
|
||||
angularjs-rails (= 1.5.5)
|
||||
atomic
|
||||
awesome_print
|
||||
aws-sdk
|
||||
@@ -657,7 +668,6 @@ DEPENDENCIES
|
||||
bugsnag
|
||||
capybara
|
||||
coffee-rails (~> 3.2.1)
|
||||
comfortable_mexican_sofa
|
||||
compass-rails
|
||||
css_splitter
|
||||
custom_error_message!
|
||||
@@ -668,6 +678,7 @@ DEPENDENCIES
|
||||
debugger-linecache
|
||||
deface!
|
||||
delayed_job_active_record
|
||||
diffy
|
||||
factory_girl_rails
|
||||
figaro
|
||||
foreigner
|
||||
@@ -685,13 +696,15 @@ DEPENDENCIES
|
||||
haml
|
||||
i18n (~> 0.6.11)
|
||||
immigrant
|
||||
jquery-migrate-rails
|
||||
jquery-rails
|
||||
json_spec
|
||||
knapsack
|
||||
letter_opener
|
||||
momentjs-rails
|
||||
newrelic_rpm
|
||||
nokogiri
|
||||
nokogiri (>= 1.6.7.1)
|
||||
ofn-qz!
|
||||
oj
|
||||
paper_trail (~> 3.0.8)
|
||||
paperclip
|
||||
@@ -707,6 +720,7 @@ DEPENDENCIES
|
||||
redcarpet
|
||||
representative_view
|
||||
roadie-rails (~> 1.0.3)
|
||||
roo (~> 2.7.0)
|
||||
rspec-rails
|
||||
rspec-retry
|
||||
sass (~> 3.3)
|
||||
@@ -730,3 +744,9 @@ DEPENDENCIES
|
||||
whenever
|
||||
wicked_pdf
|
||||
wkhtmltopdf-binary
|
||||
|
||||
RUBY VERSION
|
||||
ruby 2.1.5p273
|
||||
|
||||
BUNDLED WITH
|
||||
1.14.3
|
||||
|
||||
@@ -98,6 +98,14 @@ The site is configured to use
|
||||
startup time while Rails loads. See the Zeus github page for
|
||||
usage instructions.
|
||||
|
||||
Once [npm dependencies are
|
||||
installed](https://github.com/openfoodfoundation/openfoodnetwork/wiki/Karma), AngularJS tests can be run with:
|
||||
|
||||
./script/karma run
|
||||
|
||||
If you want karma to automatically rerun the tests on file modification, use:
|
||||
|
||||
./script/karma start
|
||||
|
||||
## Credits
|
||||
|
||||
|
||||
2
Rakefile
@@ -2,7 +2,7 @@
|
||||
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
||||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
||||
|
||||
require File.expand_path('../config/application', __FILE__)
|
||||
require_relative 'config/application'
|
||||
|
||||
Openfoodnetwork::Application.load_tasks
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 619 B |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 1003 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 662 KiB After Width: | Height: | Size: 570 KiB |
|
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 283 KiB |
|
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 206 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 784 B |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 840 B |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 535 B |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 971 B After Width: | Height: | Size: 957 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
app/assets/images/ofn-logo-footer.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
80
app/assets/images/ofn-logo-mobile.svg
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 300 104"
|
||||
enable-background="new 0 0 300 104"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="logo-black.svg"
|
||||
width="100%"
|
||||
height="100%">
|
||||
<metadata
|
||||
id="metadata24">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs22" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="741"
|
||||
id="namedview20"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.8101934"
|
||||
inkscape:cx="126.57728"
|
||||
inkscape:cy="62.030566"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g4" />
|
||||
<g
|
||||
id="g4"
|
||||
fill="#fff">
|
||||
<path
|
||||
d="M142.7 15.6c.4 3.2.4 7.5 0 10.7-.5 4.6-3.8 8.4-9.1 8.4s-8.5-3.8-9.1-8.4c-.4-3.2-.4-7.5 0-10.7.5-4.6 3.8-8.4 9.1-8.4s8.6 3.8 9.1 8.4m-5.3 10.7c.4-3.2.4-7.5 0-10.7-.2-1.7-1.4-3-3.7-3-2.3 0-3.5 1.4-3.7 3-.4 3.2-.4 7.5 0 10.7.2 1.7 1.4 3 3.7 3 2.3 0 3.5-1.3 3.7-3"
|
||||
id="path6"
|
||||
style="fill:#000000" />
|
||||
<path
|
||||
d="M156.4 7.6c4.4 0 8 3.6 8 8s-3.6 8-8 8H153c-.2 0-.4.2-.4.4v9.5c0 .4-.3.8-.8.8H148c-.4 0-.8-.3-.8-.8V8.4c0-.4.3-.8.8-.8h8.4zm-3.5 5.3c-.2 0-.4.2-.4.4v4.6c0 .2.2.4.4.4h3.4c1.4 0 2.7-1.2 2.7-2.7 0-1.4-1.2-2.7-2.7-2.7h-3.4zM172.9 28.6c0 .2.2.4.4.4h9c.4 0 .8.3.8.8v3.8c0 .4-.3.8-.8.8h-14c-.4 0-.8-.3-.8-.8V8.4c0-.4.3-.8.8-.8h13.8c.4 0 .8.3.8.8v3.8c0 .4-.3.8-.8.8h-8.9c-.2 0-.4.2-.4.4V18c0 .2.2.4.4.4h8.6c.4 0 .8.3.8.8V23c0 .4-.3.8-.8.8h-8.6c-.2 0-.4.2-.4.4v4.4zM199.4 34.3c-.6 0-.9-.3-1-.6l-5.2-13.4c-.1-.2-.3-.2-.3.1v13.2c0 .4-.3.8-.8.8h-3.8c-.4 0-.8-.3-.8-.8V8.4c0-.4.3-.8.8-.8h4.5c.6 0 .8.3 1 .7l5.2 14.5c.1.2.3.2.3-.1V8.4c0-.4.3-.8.8-.8h3.8c.4 0 .8.3.8.8v25.1c0 .4-.3.8-.8.8h-4.5zM224.4 24v9.5c0 .4-.3.8-.8.8h-3.8c-.4 0-.8-.3-.8-.8V8.4c0-.4.3-.8.8-.8h13.3c.4 0 .8.3.8.8v3.8c0 .4-.3.8-.8.8h-8.4c-.2 0-.4.2-.4.4V18c0 .2.2.4.4.4h8c.4 0 .8.3.8.8V23c0 .4-.3.8-.8.8h-8c-.1-.2-.3 0-.3.2M255.6 15.6c.4 3.2.4 7.5 0 10.7-.5 4.6-3.8 8.4-9.1 8.4s-8.5-3.8-9.1-8.4c-.4-3.2-.4-7.5 0-10.7.5-4.6 3.8-8.4 9.1-8.4s8.6 3.8 9.1 8.4m-5.3 10.7c.4-3.2.4-7.5 0-10.7-.2-1.7-1.4-3-3.7-3-2.3 0-3.5 1.4-3.7 3-.4 3.2-.4 7.5 0 10.7.2 1.7 1.4 3 3.7 3 2.3 0 3.5-1.3 3.7-3M278 15.6c.4 3.2.4 7.5 0 10.7-.5 4.6-3.8 8.4-9.1 8.4s-8.5-3.8-9.1-8.4c-.4-3.2-.4-7.5 0-10.7.5-4.6 3.8-8.4 9.1-8.4s8.5 3.8 9.1 8.4m-5.4 10.7c.4-3.2.4-7.5 0-10.7-.2-1.7-1.4-3-3.7-3-2.3 0-3.5 1.4-3.7 3-.4 3.2-.4 7.5 0 10.7.2 1.7 1.4 3 3.7 3 2.3 0 3.5-1.3 3.7-3"
|
||||
id="path8"
|
||||
style="fill:#000000" />
|
||||
<path
|
||||
d="M291.2 7.6c4.7 0 8 3.8 8.5 8.4.4 3.2.4 6.6 0 9.8-.5 4.6-3.8 8.4-8.5 8.4h-8c-.4 0-.8-.3-.8-.8v-25c0-.4.3-.8.8-.8h8zm-3 5.3c-.2 0-.4.2-.4.4v15.2c0 .2.2.4.4.4h3c1.8 0 2.9-1.4 3.1-3.1.4-3.2.4-6.6 0-9.8-.2-1.7-1.4-3.1-3.1-3.1h-3zM137.5 67.9c-.4 0-.6-.1-.8-.6l-9.1-20.8c-.1-.1-.3-.1-.3.1v20.6c0 .4-.3.7-.8.7h-.8c-.4 0-.8-.3-.8-.7V43.3c0-.4.3-.7.8-.7h2c.4 0 .6.1.8.6l9.1 20.6c.1.1.3.1.3-.1V43.3c0-.4.3-.7.8-.7h.8c.4 0 .8.3.8.7v23.9c0 .4-.3.7-.8.7h-2zM146.7 65.3c0 .2.2.4.4.4h9.9c.4 0 .8.3.8.7v.9c0 .4-.3.7-.8.7h-12c-.4 0-.8-.3-.8-.7v-24c0-.4.3-.7.8-.7h12c.4 0 .8.3.8.7v.9c0 .4-.3.7-.8.7h-9.9c-.2 0-.4.1-.4.4v8.2c0 .2.2.4.4.4h9.4c.4 0 .8.3.8.7v.8c0 .4-.3.7-.8.7h-9.4c-.2 0-.4.1-.4.4v8.8zM170 45.3v21.9c0 .4-.3.7-.8.7h-1c-.4 0-.8-.3-.8-.7V45.3c0-.2-.2-.4-.4-.4h-5.6c-.4 0-.8-.3-.8-.7v-.9c0-.4.3-.7.8-.7H176c.4 0 .8.3.8.7v.9c0 .4-.3.7-.8.7h-5.6c-.2 0-.4.2-.4.4M187 67.9h-2.1c-.3 0-.6-.2-.7-.5L179 43.3c-.1-.4.2-.7.8-.7h.9c.3 0 .6.1.7.5l4.3 20.7c0 .1.1.2.2.2h.1c.1 0 .2-.1.2-.2l4-20.7c.1-.4.4-.5.7-.5h1.3c.3 0 .6.2.7.5l4.3 20.7c0 .1.1.2.2.2h.1c.1 0 .2-.1.2-.2l4.6-20.7c.1-.4.4-.5.7-.5h.9c.6 0 .8.4.8.7l-5.5 24.1c-.1.4-.4.5-.7.5h-2.1c-.3 0-.6-.2-.7-.5l-4-19.3c0-.2-.3-.2-.3 0l-3.8 19.3c0 .4-.3.5-.6.5M223.9 49.8c.4 2.9.4 7.9 0 10.9-.6 4.7-3.9 7.5-8.5 7.5s-7.8-2.9-8.5-7.5c-.4-2.9-.4-8 0-10.9.6-3.9 3.5-7.5 8.5-7.5s7.9 3.6 8.5 7.5m-2.6 10.9c.5-3 .5-7.9 0-10.9-.4-2.6-2.3-5.2-5.9-5.2-3.6 0-5.5 2.6-5.9 5.2-.5 3-.5 7.9 0 10.9.3 2.1 1.8 5.2 5.9 5.2 4.1 0 5.6-3.1 5.9-5.2"
|
||||
id="path10"
|
||||
style="fill:#000000" />
|
||||
<path
|
||||
d="m 230.9,57.8 c -0.2,0 -0.4,0.1 -0.4,0.4 l 0,9 c 0,0.4 -0.3,0.7 -0.8,0.7 l -0.9,0 c -0.4,0 -0.8,-0.3 -0.8,-0.7 l 0,-23.9 c 0,-0.4 0.3,-0.7 0.8,-0.7 l 6.5,0 c 4.4,0 8,3.4 8,7.6 0,3.3 -1.8,5.2 -4.5,6.9 -0.5,0.3 -0.6,0.6 -0.3,1.2 l 4.8,8.6 c 0.3,0.5 0,1.1 -0.7,1.1 l -0.8,0 c -0.6,0 -0.9,-0.3 -1.1,-0.7 l -4.9,-9 c -0.1,-0.2 -0.3,-0.4 -0.7,-0.4 l -4.2,0 z m 0,-12.9 c -0.2,0 -0.4,0.1 -0.4,0.4 l 0,9.8 c 0,0.2 0.2,0.4 0.4,0.4 l 4.4,0 c 3,0 5.6,-2.4 5.6,-5.3 0,-2.9 -2.5,-5.3 -5.6,-5.3 z m 18.4,12.2 C 249.2,57 249,57 249,57.2 l 0,10 c 0,0.4 -0.3,0.7 -0.8,0.7 l -0.9,0 c -0.4,0 -0.8,-0.3 -0.8,-0.7 l 0,-23.9 c 0,-0.4 0.3,-0.7 0.8,-0.7 l 0.9,0 c 0.4,0 0.8,0.3 0.8,0.7 l 0,9.6 c 0,0.2 0.2,0.2 0.3,0.1 l 8.8,-10 c 0.1,-0.1 0.4,-0.4 1,-0.4 l 0.6,0 c 0.9,0 1.1,0.8 0.6,1.3 l -9.4,10.5 c -0.2,0.3 -0.3,0.5 0,0.9 L 261,66.6 c 0.4,0.5 0.3,1.3 -0.7,1.3 l -0.8,0 c -0.6,0 -0.8,-0.3 -1,-0.5 z"
|
||||
id="path12"
|
||||
style="fill:#000000"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cssssssssscccssccsccsssssssscssssssssssccssccccsscc" />
|
||||
<path
|
||||
d="m 3,44.3 0.5,0 c 1.2,0 2.2,-0.9 2.4,-2 0.5,-2.4 1.1,-4.7 2,-7 6.6,-18.2 23.5,-30.4 42,-30.4 18.5,0 35.4,12.2 42,30.3 0.8,2.2 1.5,4.6 2,6.9 0.3,1.3 1.6,2.2 2.9,1.9 1.3,-0.3 2.2,-1.6 1.9,-2.9 C 98.2,38.5 97.4,36 96.5,33.5 89.2,13.5 70.5,0 49.9,0 29.3,0 10.6,13.5 3.3,33.6 2.4,36.1 1.7,38.7 1.1,41.3 l 0,0.2 L 3.5,42 1.1,41.5 C 0.8,42.8 1.7,44.1 3,44.3 M 99.8,53 C 99.9,52 99.4,51 98.4,50.5 95,48.9 90.7,47.4 85.9,46.3 84.4,45.9 82.8,45.6 81.2,45.3 77.9,44.7 74.3,44.1 70.5,43.7 69.8,36.3 66.6,30.9 61,27.1 54.7,22.9 46.9,22.7 40.1,26.5 33.5,30.1 29.3,36.6 29,43.8 17.9,45.2 8.2,47.6 1.4,50.9 1.3,50.9 1.3,51 1.2,51 1.1,51 1.1,51.1 1,51.1 l -0.1,0.1 c -0.1,0.1 -0.2,0.1 -0.2,0.2 -0.4,0.4 -0.6,1 -0.6,1.6 0,1.4 0.1,2.7 0.2,4.1 0,0.4 0.1,0.7 0.1,1.1 0.3,2.6 0.8,5.2 1.5,7.7 0.2,0.7 0.3,1.4 0.5,2 0.3,0.9 0.6,1.7 0.9,2.6 0.7,1.8 1.4,3.6 2.2,5.2 0.8,1.6 1.7,3.1 2.6,4.6 0.7,1.2 1.5,2.3 2.4,3.5 1,1.3 2,2.6 3.2,3.8 1.5,1.7 3.1,3.2 4.8,4.6 1.4,1.2 2.9,2.3 4.4,3.3 1.9,1.3 3.8,2.4 5.9,3.4 2,0.9 4,1.8 6.1,2.4 2.1,0.7 4.3,1.2 6.5,1.6 2.8,0.5 5.7,0.8 8.7,0.8 l 0.1,0 c 13.6,0 26.5,-5.9 35.8,-15.9 1.8,-1.9 3.4,-3.9 4.9,-6.1 0.2,-0.2 0.3,-0.5 0.5,-0.7 1.5,-2.4 2.9,-4.8 4,-7.4 0.9,-2 1.6,-4 2.2,-6 1.3,-4.5 2.1,-9.5 2.2,-14.6 0,0.1 0,0.1 0,0 M 85.7,51.3 c 3.3,0.8 6.3,1.8 8.9,2.9 -3.4,1.6 -6.7,2.9 -9.9,4.1 -1.9,0.7 -3.7,1.2 -5.5,1.7 -3.5,1 -7.1,1.6 -10.7,2 1.3,-4.4 2,-8.8 2.2,-13.4 3.6,0.4 7,1 10.2,1.6 1.7,0.4 3.3,0.7 4.8,1.1 m -13,23.1 C 69.5,74.8 66.2,75 63,75 c 1.5,-2.5 2.7,-5.2 3.8,-7.8 3.6,-0.2 7,-0.7 10.4,-1.5 -1.3,2.9 -2.8,5.8 -4.5,8.7 m -9.8,12.5 c -2.8,0 -5.6,-0.1 -8.4,-0.5 1.9,-2.1 3.7,-4.3 5.4,-6.5 1.2,0.1 2.5,0.1 3.7,0.1 1.8,0 3.7,-0.1 5.5,-0.2 -1.9,2.4 -4,4.8 -6.2,7.1 M 40.2,82.4 c 1.6,-1.7 3,-3.4 4.4,-5.2 3.2,0.9 6.4,1.6 9.5,2 -1.7,2.1 -3.5,4.1 -5.4,6 -2.8,-0.7 -5.6,-1.6 -8.5,-2.8 M 6.6,65 C 6.1,63.1 5.7,61.2 5.4,59.2 c 7.2,-1.8 16.6,-1.4 26.2,1.3 -0.9,2 -2,3.9 -3.2,5.8 C 19.3,64 11.6,64.2 6.6,65 m 50.7,9.7 c -3.2,-0.3 -6.5,-0.9 -9.8,-1.7 1.4,-2.2 2.6,-4.5 3.7,-6.9 3.5,0.6 6.8,1 10.1,1.1 -1.1,2.5 -2.4,5.1 -4,7.5 M 42.7,71.4 c -1.5,-0.5 -3,-1.1 -4.5,-1.8 -1.7,-0.7 -3.3,-1.3 -4.9,-1.9 1.1,-1.9 2.2,-3.8 3.1,-5.8 3.5,1.2 6.8,2.2 10,3 -1.1,2.3 -2.4,4.5 -3.7,6.5 M 30.5,72 c 1.8,0.6 3.8,1.3 5.7,2.2 1.2,0.5 2.3,1 3.5,1.4 -1.3,1.7 -2.8,3.3 -4.3,4.8 -3.1,-1.2 -6.2,-2.3 -9.3,-3 1.5,-1.8 3,-3.6 4.4,-5.4 m 12,-41.3 c 5.2,-2.9 11.1,-2.7 15.8,0.4 4.2,2.8 6.5,6.7 7.3,12 -5,-0.4 -10.2,-0.6 -15.5,-0.6 -5.5,0 -10.9,0.3 -16,0.7 0.4,-5.1 3.5,-9.8 8.4,-12.5 m 7.5,16.8 2.1,0 c 1,0 2,0 3.1,0.1 3.6,0.1 7.2,0.3 10.6,0.6 -0.2,4.8 -1,9.5 -2.5,14.1 -3.2,0 -6.5,-0.3 -10,-0.9 -1.6,-0.3 -3.2,-0.6 -4.9,-1 -3.2,-0.7 -6.6,-1.7 -10.2,-3 -0.1,0 -0.2,-0.1 -0.3,-0.1 C 36.4,56.8 35,56.3 33.5,55.9 23.9,53.1 14.6,52.4 6.8,53.9 17.1,49.8 32.9,47.5 50,47.5 M 8.2,69.7 c 4.2,-0.5 10.1,-0.7 17.2,0.9 -1.5,1.9 -3.2,3.8 -5,5.5 -3.3,-0.5 -6.5,-0.8 -9.6,-0.7 -1,-1.8 -1.9,-3.7 -2.6,-5.7 m 9.5,15.2 c -1.1,-1.2 -2.2,-2.4 -3.2,-3.8 -0.2,-0.3 -0.4,-0.5 -0.6,-0.8 0.5,0 1,0 1.5,0.1 2,0.2 4.2,0.4 6.5,0.9 2.8,0.6 6,1.5 9.3,2.7 -2.5,2.1 -5.3,4.1 -8.2,5.8 -1.8,-1.4 -3.6,-3.1 -5.3,-4.9 m 9.9,8 c 3.2,-2 6.1,-4.3 8.8,-6.8 2.7,1.2 5.3,2.2 8,2.9 -3,2.6 -6.3,5.1 -10,7.1 -2.4,-0.8 -4.7,-1.9 -6.8,-3.2 m 13.1,5.2 c 3.5,-2.3 6.6,-5 9.4,-7.5 2.7,0.5 5.3,0.9 7.9,1.1 -3.2,3 -6.3,5.4 -9.4,7.4 -2.6,-0.2 -5.3,-0.5 -7.9,-1 m 17.1,0.2 c 2.4,-1.9 4.7,-4.1 7.2,-6.6 3.6,-0.1 7.2,-0.6 10.8,-1.3 -5.3,4 -11.5,6.7 -18,7.9 M 86.7,79.2 c -1.1,1.6 -2.3,3.1 -3.5,4.5 -4.4,1.2 -8.8,2.2 -13.2,2.7 2.1,-2.4 3.9,-4.9 5.6,-7.5 4.4,-0.7 8.8,-1.7 13.1,-3 -0.7,1.2 -1.3,2.2 -2,3.3 m -7.8,-5.9 c 1.6,-3.1 3,-6.2 4.1,-9.3 3.7,-1.2 7.4,-2.6 11.3,-4.3 -0.5,3.5 -1.5,6.9 -2.7,10.2 -4.2,1.4 -8.4,2.5 -12.7,3.4"
|
||||
id="path18"
|
||||
style="fill:#000000"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="csccsccsccscccccccccccccccscscscccscsccccccccsscccccccccccccccccccccccsccccccccccccccccccccccccccccccccscccscccccccccccccccccccccccccccccccccccccccccccccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.7 KiB |
BIN
app/assets/images/ofn-logo.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 39 KiB |
BIN
app/assets/images/select2.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 881 B |
BIN
app/assets/images/select2x2.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 928 B |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 54 KiB |
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
//= require jquery
|
||||
//= require jquery-migrate-min
|
||||
//= require jquery_ujs
|
||||
//= require jquery-ui
|
||||
//= require shared/jquery-ui-timepicker-addon
|
||||
@@ -36,14 +37,19 @@
|
||||
//= require ./order_cycles/order_cycles
|
||||
//= require ./payment_methods/payment_methods
|
||||
//= require ./products/products
|
||||
//= require ./resources/resources
|
||||
//= require ./shipping_methods/shipping_methods
|
||||
//= require ./side_menu/side_menu
|
||||
//= require ./tag_rules/tag_rules
|
||||
//= require ./taxons/taxons
|
||||
//= require ./utils/utils
|
||||
//= require ./users/users
|
||||
//= require ./variant_overrides/variant_overrides
|
||||
//= require textAngular.min.js
|
||||
//= require textAngular-rangy.min.js
|
||||
//= require textAngular-sanitize.min.js
|
||||
//= require ../shared/bindonce.min.js
|
||||
//= require textAngular.min.js
|
||||
//= require darkswarm/i18n.js
|
||||
//= require darkswarm/i18n.translate.js
|
||||
|
||||
|
||||
//= require_tree .
|
||||
|
||||
@@ -1,222 +0,0 @@
|
||||
angular.module("ofn.admin").controller "AdminOrderMgmtCtrl", [
|
||||
"$scope", "$http", "$filter", "dataFetcher", "blankOption", "pendingChanges", "VariantUnitManager", "OptionValueNamer", "SpreeApiKey", "Columns"
|
||||
($scope, $http, $filter, dataFetcher, blankOption, pendingChanges, VariantUnitManager, OptionValueNamer, SpreeApiKey, Columns) ->
|
||||
$scope.loading = true
|
||||
|
||||
$scope.initialiseVariables = ->
|
||||
start = daysFromToday -7
|
||||
end = daysFromToday 1
|
||||
$scope.lineItems = []
|
||||
$scope.filteredLineItems = []
|
||||
$scope.confirmDelete = true
|
||||
$scope.startDate = formatDate start
|
||||
$scope.endDate = formatDate end
|
||||
$scope.quickSearch = ""
|
||||
$scope.bulkActions = [ { name: "Delete Selected", callback: $scope.deleteLineItems } ]
|
||||
$scope.selectedBulkAction = $scope.bulkActions[0]
|
||||
$scope.selectedUnitsProduct = {};
|
||||
$scope.selectedUnitsVariant = {};
|
||||
$scope.sharedResource = false
|
||||
$scope.columns = Columns.setColumns
|
||||
order_no: { name: "Order No.", visible: false }
|
||||
full_name: { name: "Name", visible: true }
|
||||
email: { name: "Email", visible: false }
|
||||
phone: { name: "Phone", visible: false }
|
||||
order_date: { name: "Order Date", visible: true }
|
||||
producer: { name: "Producer", visible: true }
|
||||
order_cycle: { name: "Order Cycle", visible: false }
|
||||
hub: { name: "Hub", visible: false }
|
||||
variant: { name: "Variant", visible: true }
|
||||
quantity: { name: "Quantity", visible: true }
|
||||
max: { name: "Max", visible: true }
|
||||
final_weight_volume: { name: "Weight/Volume", visible: false }
|
||||
price: { name: "Price", visible: false }
|
||||
$scope.initialise = ->
|
||||
$scope.initialiseVariables()
|
||||
authorise_api_reponse = ""
|
||||
dataFetcher("/api/users/authorise_api?token=" + SpreeApiKey).then (data) ->
|
||||
authorise_api_reponse = data
|
||||
$scope.spree_api_key_ok = data.hasOwnProperty("success") and data["success"] == "Use of API Authorised"
|
||||
if $scope.spree_api_key_ok
|
||||
$http.defaults.headers.common["X-Spree-Token"] = SpreeApiKey
|
||||
dataFetcher("/api/enterprises/accessible?template=bulk_index&q[is_primary_producer_eq]=true").then (data) ->
|
||||
$scope.suppliers = $filter('orderBy')(data, 'name')
|
||||
$scope.suppliers.unshift blankOption()
|
||||
dataFetcher("/api/enterprises/accessible?template=bulk_index&q[sells_in][]=own&q[sells_in][]=any").then (data) ->
|
||||
$scope.distributors = $filter('orderBy')(data, 'name')
|
||||
$scope.distributors.unshift blankOption()
|
||||
ocFetcher = dataFetcher("/api/order_cycles/accessible?as=distributor&q[orders_close_at_gt]=#{formatDate(daysFromToday(-90))}").then (data) ->
|
||||
$scope.orderCycles = data
|
||||
$scope.orderCyclesByID = []
|
||||
$scope.orderCyclesByID[oc.id] = oc for oc in $scope.orderCycles
|
||||
$scope.orderCycles.unshift blankOption()
|
||||
$scope.fetchOrders()
|
||||
ocFetcher.then ->
|
||||
$scope.resetSelectFilters()
|
||||
else if authorise_api_reponse.hasOwnProperty("error")
|
||||
$scope.api_error_msg = authorise_api_reponse("error")
|
||||
else
|
||||
api_error_msg = "You don't have an API key yet. An attempt was made to generate one, but you are currently not authorised, please contact your site administrator for access."
|
||||
|
||||
$scope.fetchOrders = ->
|
||||
$scope.loading = true
|
||||
dataFetcher("/admin/orders/managed?template=bulk_index;page=1;per_page=500;q[state_not_eq]=canceled;q[completed_at_not_null]=true;q[completed_at_gt]=#{$scope.startDate};q[completed_at_lt]=#{$scope.endDate}").then (data) ->
|
||||
$scope.resetOrders data
|
||||
$scope.loading = false
|
||||
|
||||
$scope.resetOrders = (data) ->
|
||||
$scope.orders = data
|
||||
$scope.resetLineItems()
|
||||
pendingChanges.removeAll()
|
||||
|
||||
$scope.resetLineItems = ->
|
||||
$scope.lineItems = $scope.orders.reduce (lineItems,order) ->
|
||||
orderWithoutLineItems = $scope.lineItemOrder order
|
||||
for i,line_item of order.line_items
|
||||
line_item.checked = false
|
||||
line_item.supplier = $scope.matchObject $scope.suppliers, line_item.supplier, null
|
||||
line_item.order = orderWithoutLineItems
|
||||
line_item.original_final_weight_volume = line_item.final_weight_volume
|
||||
line_item.original_quantity = line_item.quantity
|
||||
line_item.original_price = line_item.price
|
||||
|
||||
lineItems.concat order.line_items
|
||||
, []
|
||||
|
||||
$scope.lineItemOrder = (order) ->
|
||||
lineItemOrder = angular.copy(order)
|
||||
delete lineItemOrder.line_items
|
||||
lineItemOrder.distributor = $scope.matchObject $scope.distributors, order.distributor, null
|
||||
lineItemOrder.order_cycle = $scope.matchObject $scope.orderCycles, order.order_cycle, null
|
||||
lineItemOrder
|
||||
|
||||
$scope.matchObject = (list, testObject, noMatch) ->
|
||||
for i, object of list
|
||||
if angular.equals(object, testObject)
|
||||
return object
|
||||
return noMatch
|
||||
|
||||
$scope.deleteLineItem = (lineItem) ->
|
||||
if ($scope.confirmDelete && confirm("Are you sure?")) || !$scope.confirmDelete
|
||||
$http(
|
||||
method: "DELETE"
|
||||
url: "/api/orders/" + lineItem.order.number + "/line_items/" + lineItem.id
|
||||
).success (data) ->
|
||||
$scope.lineItems.splice $scope.lineItems.indexOf(lineItem), 1
|
||||
|
||||
$scope.deleteLineItems = (lineItems) ->
|
||||
existingState = $scope.confirmDelete
|
||||
$scope.confirmDelete = false
|
||||
$scope.deleteLineItem lineItem for lineItem in lineItems when lineItem.checked
|
||||
$scope.confirmDelete = existingState
|
||||
|
||||
$scope.submit = ->
|
||||
if $scope.bulk_order_form.$valid
|
||||
pendingChanges.submitAll()
|
||||
else
|
||||
alert "Some errors must be resolved be before you can update orders.\nAny fields with red borders contain errors."
|
||||
|
||||
$scope.allBoxesChecked = ->
|
||||
checkedCount = $scope.filteredLineItems.reduce (count,lineItem) ->
|
||||
count + (if lineItem.checked then 1 else 0 )
|
||||
, 0
|
||||
checkedCount == $scope.filteredLineItems.length
|
||||
|
||||
$scope.toggleAllCheckboxes = ->
|
||||
changeTo = !$scope.allBoxesChecked()
|
||||
lineItem.checked = changeTo for lineItem in $scope.filteredLineItems
|
||||
|
||||
$scope.setSelectedUnitsVariant = (unitsProduct,unitsVariant) ->
|
||||
$scope.selectedUnitsProduct = unitsProduct
|
||||
$scope.selectedUnitsVariant = unitsVariant
|
||||
|
||||
$scope.sumUnitValues = ->
|
||||
sum = $scope.filteredLineItems.reduce (sum,lineItem) ->
|
||||
sum = sum + lineItem.final_weight_volume
|
||||
, 0
|
||||
|
||||
$scope.sumMaxUnitValues = ->
|
||||
sum = $scope.filteredLineItems.reduce (sum,lineItem) ->
|
||||
sum = sum + Math.max(lineItem.max_quantity,lineItem.original_quantity) * lineItem.units_variant.unit_value
|
||||
, 0
|
||||
|
||||
$scope.allFinalWeightVolumesPresent = ->
|
||||
for i,lineItem of $scope.filteredLineItems
|
||||
return false if !lineItem.hasOwnProperty('final_weight_volume') || !(lineItem.final_weight_volume > 0)
|
||||
true
|
||||
|
||||
# How is this different to OptionValueNamer#name?
|
||||
# Should it be extracted to that class or VariantUnitManager?
|
||||
$scope.formattedValueWithUnitName = (value, unitsProduct, unitsVariant) ->
|
||||
# A Units Variant is an API object which holds unit properies of a variant
|
||||
if unitsProduct.hasOwnProperty("variant_unit") && (unitsProduct.variant_unit == "weight" || unitsProduct.variant_unit == "volume") && value > 0
|
||||
scale = VariantUnitManager.getScale(value, unitsProduct.variant_unit)
|
||||
Math.round(value/scale * 1000)/1000 + " " + VariantUnitManager.getUnitName(scale, unitsProduct.variant_unit)
|
||||
else
|
||||
''
|
||||
|
||||
$scope.fulfilled = (sumOfUnitValues) ->
|
||||
# A Units Variant is an API object which holds unit properies of a variant
|
||||
if $scope.selectedUnitsProduct.hasOwnProperty("group_buy_unit_size") && $scope.selectedUnitsProduct.group_buy_unit_size > 0 &&
|
||||
$scope.selectedUnitsProduct.hasOwnProperty("variant_unit") &&
|
||||
( $scope.selectedUnitsProduct.variant_unit == "weight" || $scope.selectedUnitsProduct.variant_unit == "volume" )
|
||||
Math.round( sumOfUnitValues / $scope.selectedUnitsProduct.group_buy_unit_size * 1000)/1000
|
||||
else
|
||||
''
|
||||
|
||||
$scope.unitsVariantSelected = ->
|
||||
!angular.equals($scope.selectedUnitsVariant,{})
|
||||
|
||||
$scope.resetSelectFilters = ->
|
||||
$scope.distributorFilter = $scope.distributors[0].id
|
||||
$scope.supplierFilter = $scope.suppliers[0].id
|
||||
$scope.orderCycleFilter = $scope.orderCycles[0].id
|
||||
$scope.quickSearch = ""
|
||||
|
||||
$scope.weightAdjustedPrice = (lineItem) ->
|
||||
if lineItem.final_weight_volume > 0
|
||||
unit_value = lineItem.final_weight_volume / lineItem.quantity
|
||||
original_unit_value = lineItem.original_final_weight_volume / lineItem.original_quantity
|
||||
lineItem.price = lineItem.original_price * (unit_value / original_unit_value)
|
||||
|
||||
$scope.unitValueLessThanZero = (lineItem) ->
|
||||
if lineItem.units_variant.unit_value <= 0
|
||||
true
|
||||
else
|
||||
false
|
||||
|
||||
$scope.updateOnQuantity = (lineItem) ->
|
||||
if lineItem.quantity > 0
|
||||
lineItem.final_weight_volume = lineItem.original_final_weight_volume * lineItem.quantity / lineItem.original_quantity
|
||||
$scope.weightAdjustedPrice(lineItem)
|
||||
|
||||
$scope.$watch "orderCycleFilter", (newVal, oldVal) ->
|
||||
unless $scope.orderCycleFilter == "0" || angular.equals(newVal, oldVal)
|
||||
$scope.startDate = $scope.orderCyclesByID[$scope.orderCycleFilter].first_order
|
||||
$scope.endDate = $scope.orderCyclesByID[$scope.orderCycleFilter].last_order
|
||||
]
|
||||
|
||||
daysFromToday = (days) ->
|
||||
now = new Date
|
||||
now.setHours(0)
|
||||
now.setMinutes(0)
|
||||
now.setSeconds(0)
|
||||
now.setDate( now.getDate() + days )
|
||||
now
|
||||
|
||||
formatDate = (date) ->
|
||||
year = date.getFullYear()
|
||||
month = twoDigitNumber date.getMonth() + 1
|
||||
day = twoDigitNumber date.getDate()
|
||||
return year + "-" + month + "-" + day
|
||||
|
||||
formatTime = (date) ->
|
||||
hours = twoDigitNumber date.getHours()
|
||||
mins = twoDigitNumber date.getMinutes()
|
||||
secs = twoDigitNumber date.getSeconds()
|
||||
return hours + ":" + mins + ":" + secs
|
||||
|
||||
twoDigitNumber = (number) ->
|
||||
twoDigits = "" + number
|
||||
twoDigits = ("0" + number) if number < 10
|
||||
twoDigits
|
||||
@@ -1,39 +1,28 @@
|
||||
angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout, $http, BulkProducts, DisplayProperties, dataFetcher, DirtyProducts, VariantUnitManager, StatusMessage, producers, Taxons, SpreeApiAuth, Columns, tax_categories) ->
|
||||
angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout, $http, $window, BulkProducts, DisplayProperties, dataFetcher, DirtyProducts, VariantUnitManager, StatusMessage, producers, Taxons, SpreeApiAuth, Columns, tax_categories) ->
|
||||
$scope.loading = true
|
||||
|
||||
$scope.StatusMessage = StatusMessage
|
||||
|
||||
$scope.columns = Columns.setColumns
|
||||
producer: {name: "Producer", visible: true}
|
||||
sku: {name: "SKU", visible: false}
|
||||
name: {name: "Name", visible: true}
|
||||
unit: {name: "Unit", visible: true}
|
||||
price: {name: "Price", visible: true}
|
||||
on_hand: {name: "On Hand", visible: true}
|
||||
on_demand: {name: "On Demand", visible: false}
|
||||
category: {name: "Category", visible: false}
|
||||
tax_category: {name: "Tax Category", visible: false}
|
||||
inherits_properties: {name: "Inherits Properties?", visible: false}
|
||||
available_on: {name: "Available On", visible: false}
|
||||
$scope.columns = Columns.columns
|
||||
|
||||
$scope.variant_unit_options = VariantUnitManager.variantUnitOptions()
|
||||
|
||||
$scope.filterableColumns = [
|
||||
{ name: "Producer", db_column: "producer_name" },
|
||||
{ name: "Name", db_column: "name" }
|
||||
{ name: t("label_producers"), db_column: "producer_name" },
|
||||
{ name: t("name"), db_column: "name" }
|
||||
]
|
||||
|
||||
$scope.filterTypes = [
|
||||
{ name: "Equals", predicate: "eq" },
|
||||
{ name: "Contains", predicate: "cont" }
|
||||
{ name: t("equals"), predicate: "eq" },
|
||||
{ name: t("contains"), predicate: "cont" }
|
||||
]
|
||||
|
||||
$scope.optionTabs =
|
||||
filters: { title: "Filter Products", visible: false }
|
||||
filters: { title: t("filter_products"), visible: false }
|
||||
|
||||
|
||||
$scope.producers = producers
|
||||
$scope.taxons = Taxons.taxons
|
||||
$scope.taxons = Taxons.all
|
||||
$scope.tax_categories = tax_categories
|
||||
$scope.filterProducers = [{id: "0", name: ""}].concat $scope.producers
|
||||
$scope.filterTaxons = [{id: "0", name: ""}].concat $scope.taxons
|
||||
@@ -105,7 +94,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
$scope.categoryFilter = "0"
|
||||
|
||||
$scope.editWarn = (product, variant) ->
|
||||
if (DirtyProducts.count() > 0 and confirm("Unsaved changes will be lost. Continue anyway?")) or (DirtyProducts.count() == 0)
|
||||
if (DirtyProducts.count() > 0 and confirm(t("unsaved_changes_confirmation"))) or (DirtyProducts.count() == 0)
|
||||
window.location = "/admin/products/" + product.permalink_live + ((if variant then "/variants/" + variant.id else "")) + "/edit"
|
||||
|
||||
|
||||
@@ -150,14 +139,14 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
if !$scope.variantSaved(variant)
|
||||
$scope.removeVariant(product, variant)
|
||||
else
|
||||
if confirm("Are you sure?")
|
||||
if confirm(t("are_you_sure"))
|
||||
$http(
|
||||
method: "DELETE"
|
||||
url: "/api/products/" + product.permalink_live + "/variants/" + variant.id + "/soft_delete"
|
||||
).success (data) ->
|
||||
$scope.removeVariant(product, variant)
|
||||
else
|
||||
alert("The last variant cannot be deleted!")
|
||||
alert(t("delete_product_variant"))
|
||||
|
||||
$scope.removeVariant = (product, variant) ->
|
||||
product.variants.splice product.variants.indexOf(variant), 1
|
||||
@@ -194,7 +183,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
if productsToSubmit.length > 0
|
||||
$scope.updateProducts productsToSubmit # Don't submit an empty list
|
||||
else
|
||||
StatusMessage.display 'alert', 'No changes to save.'
|
||||
StatusMessage.display 'alert', t("products_change")
|
||||
|
||||
|
||||
$scope.updateProducts = (productsToSubmit) ->
|
||||
@@ -212,11 +201,13 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
).error (data, status) ->
|
||||
if status == 400 && data.errors? && data.errors.length > 0
|
||||
errors = error + "\n" for error in data.errors
|
||||
alert "Saving failed with the following error(s):\n" + errors
|
||||
$scope.displayFailure "Save failed due to invalid data"
|
||||
alert t("products_update_error") + "\n" + errors
|
||||
$scope.displayFailure t("products_update_error")
|
||||
else
|
||||
$scope.displayFailure "Server returned with error status: " + status
|
||||
$scope.displayFailure t("products_update_error_data") + status
|
||||
|
||||
$scope.cancel = (destination) ->
|
||||
$window.location = destination
|
||||
|
||||
$scope.packProduct = (product) ->
|
||||
if product.variant_unit_with_scale
|
||||
@@ -253,23 +244,24 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
|
||||
|
||||
$scope.displayUpdating = ->
|
||||
StatusMessage.display 'progress', 'Saving...'
|
||||
StatusMessage.display 'progress', t("saving")
|
||||
|
||||
|
||||
$scope.displaySuccess = ->
|
||||
StatusMessage.display 'success', 'Changes saved.'
|
||||
StatusMessage.display 'success',t("products_changes_saved")
|
||||
$scope.bulk_product_form.$setPristine()
|
||||
|
||||
|
||||
$scope.displayFailure = (failMessage) ->
|
||||
StatusMessage.display 'failure', "Saving failed. #{failMessage}"
|
||||
StatusMessage.display 'failure', t("products_update_error_msg") + "#{failMessage}"
|
||||
|
||||
|
||||
$scope.displayDirtyProducts = ->
|
||||
if DirtyProducts.count() > 0
|
||||
message = if DirtyProducts.count() == 1 then "one product" else DirtyProducts.count() + " products"
|
||||
StatusMessage.display 'notice', "Changes to #{message} remain unsaved."
|
||||
else
|
||||
StatusMessage.clear()
|
||||
count = DirtyProducts.count()
|
||||
switch count
|
||||
when 0 then StatusMessage.clear()
|
||||
when 1 then StatusMessage.display 'notice', t("one_product_unsaved")
|
||||
else StatusMessage.display 'notice', t("products_unsaved", n: count)
|
||||
|
||||
|
||||
filterSubmitProducts = (productsToFilter) ->
|
||||
|
||||
@@ -9,6 +9,10 @@ angular.module("admin.businessModelConfiguration").controller "BusinessModelConf
|
||||
return $scope.bill() if !$scope.cap? || Number($scope.cap) == 0
|
||||
Math.min($scope.bill(), Number($scope.cap))
|
||||
|
||||
$scope.finalBill = ->
|
||||
return 0 if Number($scope.turnover) < Number($scope.minBillableTurnover)
|
||||
$scope.cappedBill()
|
||||
|
||||
$scope.capReached = ->
|
||||
return "No" if !$scope.cap? || Number($scope.cap) == 0
|
||||
if $scope.bill() >= Number($scope.cap) then "Yes" else "No"
|
||||
@@ -18,4 +22,4 @@ angular.module("admin.businessModelConfiguration").controller "BusinessModelConf
|
||||
($scope.cappedBill() * Number($scope.taxRate))
|
||||
|
||||
$scope.total = ->
|
||||
$scope.cappedBill() + $scope.includedTax()
|
||||
$scope.finalBill() + $scope.includedTax()
|
||||
|
||||
@@ -7,7 +7,7 @@ angular.module("ofn.admin").controller "AdminEnterpriseRelationshipsCtrl", ($sco
|
||||
$scope.EnterpriseRelationships.create($scope.parent_id, $scope.child_id, $scope.permissions)
|
||||
|
||||
$scope.delete = (enterprise_relationship) ->
|
||||
if confirm("Are you sure?")
|
||||
if confirm(t("are_you_sure"))
|
||||
$scope.EnterpriseRelationships.delete enterprise_relationship
|
||||
|
||||
$scope.toggleKeyword = (string, key) ->
|
||||
|
||||
@@ -7,5 +7,5 @@ angular.module("ofn.admin").controller "AdminEnterpriseRolesCtrl", ($scope, Ente
|
||||
$scope.EnterpriseRoles.create($scope.user_id, $scope.enterprise_id)
|
||||
|
||||
$scope.delete = (enterprise_role) ->
|
||||
if confirm("Are you sure?")
|
||||
if confirm(t('are_you_sure'))
|
||||
$scope.EnterpriseRoles.delete enterprise_role
|
||||
|
||||
@@ -1,17 +1,48 @@
|
||||
angular.module("admin.customers").controller "customersCtrl", ($scope, Customers, Columns, pendingChanges, shops) ->
|
||||
$scope.shop = null
|
||||
angular.module("admin.customers").controller "customersCtrl", ($scope, $q, $filter, Customers, TagRuleResource, CurrentShop, RequestMonitor, Columns, pendingChanges, shops, availableCountries) ->
|
||||
$scope.shops = shops
|
||||
$scope.availableCountries = availableCountries
|
||||
$scope.RequestMonitor = RequestMonitor
|
||||
$scope.submitAll = pendingChanges.submitAll
|
||||
$scope.customerLimit = 20
|
||||
$scope.customers = Customers.all
|
||||
$scope.columns = Columns.columns
|
||||
|
||||
$scope.columns = Columns.setColumns
|
||||
email: { name: "Email", visible: true }
|
||||
code: { name: "Code", visible: true }
|
||||
tags: { name: "Tags", visible: true }
|
||||
$scope.confirmRefresh = (event) ->
|
||||
event.preventDefault() unless pendingChanges.unsavedCount() == 0 || confirm(t("unsaved_changes_warning"))
|
||||
|
||||
$scope.$watch "shop", ->
|
||||
if $scope.shop?
|
||||
Customers.loaded = false
|
||||
$scope.customers = Customers.index(enterprise_id: $scope.shop.id)
|
||||
$scope.$watch "shop_id", ->
|
||||
if $scope.shop_id?
|
||||
CurrentShop.shop = $filter('filter')($scope.shops, {id: $scope.shop_id})[0]
|
||||
Customers.index({enterprise_id: $scope.shop_id}).then (data) ->
|
||||
pendingChanges.removeAll()
|
||||
$scope.customers_form.$setPristine()
|
||||
|
||||
$scope.loaded = ->
|
||||
Customers.loaded
|
||||
$scope.shop_id = shops[0].id if shops.length == 1
|
||||
|
||||
$scope.deleteCustomer = (customer) ->
|
||||
if confirm(t('admin.customers.index.confirm_delete'))
|
||||
Customers.remove(customer)
|
||||
|
||||
$scope.checkForDuplicateCodes = ->
|
||||
delete this.customer.code unless this.customer.code
|
||||
this.duplicate = $scope.isDuplicateCode(this.customer.code)
|
||||
|
||||
$scope.isDuplicateCode = (code) ->
|
||||
return false unless code
|
||||
customers = $scope.findByCode(code)
|
||||
customers.length > 1
|
||||
|
||||
$scope.findByCode = (code) ->
|
||||
if $scope.customers
|
||||
$scope.customers.filter (customer) ->
|
||||
customer.code == code
|
||||
|
||||
$scope.findTags = (query) ->
|
||||
defer = $q.defer()
|
||||
params =
|
||||
enterprise_id: $scope.shop_id
|
||||
TagRuleResource.mapByTag params, (data) =>
|
||||
filtered = data.filter (tag) ->
|
||||
tag.text.toLowerCase().indexOf(query.toLowerCase()) != -1
|
||||
defer.resolve filtered
|
||||
defer.promise
|
||||
|
||||
@@ -1 +1 @@
|
||||
angular.module("admin.customers", ['ngResource', 'ngTagsInput', 'admin.indexUtils', 'admin.dropdown'])
|
||||
angular.module("admin.customers", ['ngResource', 'admin.tagRules', 'admin.indexUtils', 'admin.utils', 'admin.dropdown'])
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
angular.module("admin.customers").directive 'editAddressDialog', ($compile, $templateCache, $filter, DialogDefaults, Customers, StatusMessage) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, element, attr) ->
|
||||
scope.errors = []
|
||||
|
||||
scope.$watch 'address.country_id', (newVal) ->
|
||||
if newVal
|
||||
scope.states = scope.filter_states(newVal)
|
||||
|
||||
scope.updateAddress = ->
|
||||
scope.edit_address_form.$setPristine()
|
||||
if scope.edit_address_form.$valid
|
||||
Customers.update(scope.address, scope.customer, scope.addressType).$promise.then (data) ->
|
||||
scope.customer = data
|
||||
template.dialog('close')
|
||||
StatusMessage.display('success', t('admin.customers.index.update_address_success'))
|
||||
else
|
||||
scope.errors.push(t('admin.customers.index.update_address_error'))
|
||||
|
||||
|
||||
template = $compile($templateCache.get('admin/edit_address_dialog.html'))(scope)
|
||||
template.dialog(DialogDefaults)
|
||||
|
||||
element.bind 'click', (e) ->
|
||||
if e.target.id == 'bill-address-link'
|
||||
scope.addressType = 'bill_address'
|
||||
else
|
||||
scope.addressType = 'ship_address'
|
||||
scope.address = scope.customer[scope.addressType]
|
||||
|
||||
template.dialog('open')
|
||||
scope.$apply()
|
||||
|
||||
scope.filter_states = (countryID) ->
|
||||
$filter('filter')(scope.availableCountries, {id: countryID})[0].states
|
||||
@@ -0,0 +1,38 @@
|
||||
angular.module("admin.customers").directive 'newCustomerDialog', ($compile, $templateCache, DialogDefaults, CurrentShop, Customers) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, element, attr) ->
|
||||
scope.CurrentShop = CurrentShop
|
||||
scope.submitted = false
|
||||
scope.email = ""
|
||||
scope.errors = []
|
||||
|
||||
scope.addCustomer = ->
|
||||
scope.new_customer_form.$setPristine()
|
||||
scope.submitted = true
|
||||
scope.errors = []
|
||||
if scope.new_customer_form.$valid
|
||||
Customers.add(scope.email).$promise.then (data) ->
|
||||
if data.id
|
||||
scope.email = ""
|
||||
scope.submitted = false
|
||||
template.dialog('close')
|
||||
, (response) ->
|
||||
if response.data.errors
|
||||
scope.errors.push(error) for error in response.data.errors
|
||||
else
|
||||
scope.errors.push("Sorry! Could not create '#{scope.email}'")
|
||||
return
|
||||
|
||||
# Compile modal template
|
||||
template = $compile($templateCache.get('admin/new_customer_dialog.html'))(scope)
|
||||
|
||||
# Set Dialog options
|
||||
template.dialog(DialogDefaults)
|
||||
|
||||
# Link opening of dialog to click event on element
|
||||
element.bind 'click', (e) ->
|
||||
if CurrentShop.shop.id
|
||||
template.dialog('open')
|
||||
else
|
||||
alert('Please select a shop first')
|
||||
@@ -1,8 +0,0 @@
|
||||
angular.module("admin.customers").directive "tagsWithTranslation", ->
|
||||
restrict: "E"
|
||||
template: "<tags-input ng-model='object.tags'>"
|
||||
scope:
|
||||
object: "="
|
||||
link: (scope, element, attrs) ->
|
||||
scope.$watchCollection "object.tags", ->
|
||||
scope.object.tag_list = (tag.text for tag in scope.object.tags).join(",")
|
||||
@@ -0,0 +1,3 @@
|
||||
angular.module("admin.customers").factory "CurrentShop", ->
|
||||
new class CurrentShop
|
||||
shop: {}
|
||||
@@ -1,8 +0,0 @@
|
||||
angular.module("admin.customers").factory 'CustomerResource', ($resource) ->
|
||||
$resource('/admin/customers.json', {}, {
|
||||
'index':
|
||||
method: 'GET'
|
||||
isArray: true
|
||||
params:
|
||||
enterprise_id: '@enterprise_id'
|
||||
})
|
||||
@@ -1,16 +0,0 @@
|
||||
angular.module("admin.customers").factory 'Customers', (CustomerResource) ->
|
||||
new class Customers
|
||||
customers: []
|
||||
customers_by_id: {}
|
||||
loaded: false
|
||||
|
||||
index: (params={}, callback=null) ->
|
||||
CustomerResource.index params, (data) =>
|
||||
for customer in data
|
||||
@customers.push customer
|
||||
@customers_by_id[customer.id] = customer
|
||||
|
||||
@loaded = true
|
||||
(callback || angular.noop)(@customers)
|
||||
|
||||
@customers
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("ofn.admin").directive "ofnTrackMaster", ["DirtyProducts", (DirtyProducts) ->
|
||||
angular.module("ofn.admin").directive "ofnTrackMaster", (DirtyProducts) ->
|
||||
require: "ngModel"
|
||||
link: (scope, element, attrs, ngModel) ->
|
||||
ngModel.$parsers.push (viewValue) ->
|
||||
@@ -6,4 +6,3 @@ angular.module("ofn.admin").directive "ofnTrackMaster", ["DirtyProducts", (Dirty
|
||||
DirtyProducts.addMasterProperty scope.product.id, scope.product.master.id, attrs.ofnTrackMaster, viewValue
|
||||
scope.displayDirtyProducts()
|
||||
viewValue
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
angular.module("admin.dropdown").controller "ColumnsDropdownCtrl", ($scope, Columns) ->
|
||||
$scope.columns = Columns.columns
|
||||
$scope.toggle = Columns.toggleColumn
|
||||
$scope.saved = Columns.preferencesSaved
|
||||
$scope.saving = false
|
||||
|
||||
$scope.saveColumnPreferences = (action_name) ->
|
||||
$scope.saving = true
|
||||
Columns.savePreferences(action_name).then ->
|
||||
$scope.saving = false
|
||||
@@ -0,0 +1,6 @@
|
||||
angular.module("admin.dropdown").directive 'columnsDropdown', ->
|
||||
restrict: 'E'
|
||||
templateUrl: 'admin/columns_dropdown.html'
|
||||
controller: 'ColumnsDropdownCtrl'
|
||||
scope:
|
||||
action: '@'
|
||||
@@ -4,12 +4,12 @@ angular.module("admin.enterprise_groups")
|
||||
$scope.select = SideMenu.select
|
||||
|
||||
$scope.menu.setItems [
|
||||
{ name: 'Primary Details', icon_class: "icon-user" }
|
||||
{ name: 'Users', icon_class: "icon-user" }
|
||||
{ name: 'About', icon_class: "icon-pencil" }
|
||||
{ name: 'Images', icon_class: "icon-picture" }
|
||||
{ name: 'Contact', icon_class: "icon-phone" }
|
||||
{ name: 'Web', icon_class: "icon-globe" }
|
||||
{ name: 'primary_details', label: t('primary_details'), icon_class: "icon-user" }
|
||||
{ name: 'users', label: t('users'), icon_class: "icon-user" }
|
||||
{ name: 'about', label: t('about'), icon_class: "icon-pencil" }
|
||||
{ name: 'images', label: t('images'), icon_class: "icon-picture" }
|
||||
{ name: 'contact', label: t('admin_entreprise_groups_contact'), icon_class: "icon-phone" }
|
||||
{ name: 'web', label: t('admin_entreprise_groups_web'), icon_class: "icon-globe" }
|
||||
]
|
||||
|
||||
$scope.select(0)
|
||||
|
||||
@@ -1,19 +1,35 @@
|
||||
angular.module("admin.enterprises")
|
||||
.controller "enterpriseCtrl", ($scope, NavigationCheck, enterprise, EnterprisePaymentMethods, EnterpriseShippingMethods, SideMenu) ->
|
||||
.controller "enterpriseCtrl", ($scope, $window, NavigationCheck, enterprise, EnterprisePaymentMethods, EnterpriseShippingMethods, SideMenu, StatusMessage) ->
|
||||
$scope.Enterprise = enterprise
|
||||
$scope.PaymentMethods = EnterprisePaymentMethods.paymentMethods
|
||||
$scope.ShippingMethods = EnterpriseShippingMethods.shippingMethods
|
||||
$scope.navClear = NavigationCheck.clear
|
||||
$scope.pristineEmail = $scope.Enterprise.email
|
||||
$scope.menu = SideMenu
|
||||
$scope.newManager = { id: '', email: 'Add a manager...' }
|
||||
$scope.newManager = { id: '', email: (t('add_manager')) }
|
||||
|
||||
$scope.StatusMessage = StatusMessage
|
||||
|
||||
$scope.$watch 'enterprise_form.$dirty', (newValue) ->
|
||||
StatusMessage.display 'notice', t('admin.unsaved_changes') if newValue
|
||||
|
||||
$scope.setFormDirty = ->
|
||||
$scope.$apply ->
|
||||
$scope.enterprise_form.$setDirty()
|
||||
|
||||
$scope.cancel = (destination) ->
|
||||
$window.location = destination
|
||||
|
||||
$scope.submit = ->
|
||||
$scope.navClear()
|
||||
enterprise_form.submit()
|
||||
|
||||
# Provide a callback for generating warning messages displayed before leaving the page. This is passed in
|
||||
# from a directive "nav-check" in the page - if we pass it here it will be called in the test suite,
|
||||
# and on all new uses of this contoller, and we might not want that .
|
||||
# and on all new uses of this contoller, and we might not want that.
|
||||
enterpriseNavCallback = ->
|
||||
if $scope.Enterprise.$dirty
|
||||
"Your changes to the enterprise are not saved yet."
|
||||
if $scope.enterprise_form.$dirty
|
||||
t('admin.unsaved_confirm_leave')
|
||||
|
||||
# Register the NavigationCheck callback
|
||||
NavigationCheck.register(enterpriseNavCallback)
|
||||
@@ -22,6 +38,8 @@ angular.module("admin.enterprises")
|
||||
if manager.id?
|
||||
for i, user of $scope.Enterprise.users when user.id == manager.id
|
||||
$scope.Enterprise.users.splice i, 1
|
||||
if $scope.enterprise_form?
|
||||
$scope.enterprise_form.$setDirty()
|
||||
|
||||
$scope.addManager = (manager) ->
|
||||
if manager.id? and manager.email?
|
||||
@@ -31,4 +49,4 @@ angular.module("admin.enterprises")
|
||||
if (user for user in $scope.Enterprise.users when user.id == manager.id).length == 0
|
||||
$scope.Enterprise.users.push manager
|
||||
else
|
||||
alert "#{manager.email} is already a manager!"
|
||||
alert ("#{manager.email}" + " " + t("is_already_manager"))
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
angular.module("admin.enterprises").controller "EnterpriseIndexRowCtrl", ($scope) ->
|
||||
$scope.status = ->
|
||||
if $scope.enterprise.issues.length > 0
|
||||
"issue"
|
||||
else if $scope.enterprise.warnings.length > 0
|
||||
"warning"
|
||||
else
|
||||
"ok"
|
||||
|
||||
|
||||
$scope.producerText = ->
|
||||
switch $scope.enterprise.is_primary_producer
|
||||
when true
|
||||
"Producer"
|
||||
else
|
||||
"Non-Producer"
|
||||
|
||||
$scope.packageText = ->
|
||||
switch $scope.enterprise.is_primary_producer
|
||||
when true
|
||||
switch $scope.enterprise.sells
|
||||
when "none"
|
||||
"Profile"
|
||||
when "own"
|
||||
"Shop"
|
||||
when "any"
|
||||
"Hub"
|
||||
else
|
||||
"Choose"
|
||||
else
|
||||
switch $scope.enterprise.sells
|
||||
when "none"
|
||||
"Profile"
|
||||
when "any"
|
||||
"Hub"
|
||||
else
|
||||
"Choose"
|
||||
|
||||
$scope.updateRowText = ->
|
||||
$scope.producer = $scope.producerText()
|
||||
$scope.package = $scope.packageText()
|
||||
$scope.producerError = ($scope.producer == "Choose")
|
||||
$scope.packageError = ($scope.package == "Choose")
|
||||
|
||||
|
||||
$scope.updateRowText()
|
||||
|
||||
$scope.$on "enterprise:updated", ->
|
||||
$scope.updateRowText()
|
||||
@@ -3,11 +3,54 @@ angular.module("admin.enterprises").controller 'enterprisesCtrl', ($scope, $q, E
|
||||
requests.push ($scope.allEnterprises = Enterprises.index(ams_prefix: "index")).$promise
|
||||
|
||||
$q.all(requests).then ->
|
||||
$scope.updateStaticFieldsFor(enterprise) for enterprise in $scope.allEnterprises
|
||||
$scope.loaded = true
|
||||
|
||||
$scope.columns = Columns.setColumns
|
||||
name: { name: "Name", visible: true }
|
||||
producer: { name: "Producer", visible: true }
|
||||
package: { name: "Package", visible: true }
|
||||
status: { name: "Status", visible: true }
|
||||
manage: { name: "Manage", visible: true }
|
||||
$scope.columns = Columns.columns
|
||||
|
||||
$scope.updateStaticFieldsFor = (enterprise) ->
|
||||
enterprise.producer = $scope.producerTextFor(enterprise)
|
||||
enterprise.package = $scope.packageTextFor(enterprise)
|
||||
enterprise.producerError = (enterprise.producer == "Choose")
|
||||
enterprise.packageError = (enterprise.package == "Choose")
|
||||
enterprise.status = $scope.statusFor(enterprise)
|
||||
|
||||
$scope.$on "enterprise:updated", (event, enterprise) ->
|
||||
$scope.updateStaticFieldsFor(enterprise)
|
||||
|
||||
$scope.statusFor = (enterprise) ->
|
||||
if enterprise.issues.length > 0
|
||||
"issue"
|
||||
else if enterprise.warnings.length > 0
|
||||
"warning"
|
||||
else
|
||||
"ok"
|
||||
|
||||
|
||||
$scope.producerTextFor = (enterprise) ->
|
||||
switch enterprise.is_primary_producer
|
||||
when true
|
||||
"Producer"
|
||||
else
|
||||
"Non-Producer"
|
||||
|
||||
$scope.packageTextFor = (enterprise) ->
|
||||
switch enterprise.is_primary_producer
|
||||
when true
|
||||
switch enterprise.sells
|
||||
when "none"
|
||||
"Profile"
|
||||
when "own"
|
||||
"Shop"
|
||||
when "any"
|
||||
"Hub"
|
||||
else
|
||||
"Choose"
|
||||
else
|
||||
switch enterprise.sells
|
||||
when "none"
|
||||
"Profile"
|
||||
when "any"
|
||||
"Hub"
|
||||
else
|
||||
"Choose"
|
||||
|
||||
@@ -9,7 +9,7 @@ angular.module("admin.enterprises").controller 'indexPanelCtrl', ($scope, Enterp
|
||||
unless $scope.saved()
|
||||
$scope.saving = true
|
||||
Enterprises.save($scope.enterprise).then (data) ->
|
||||
$scope.$emit("enterprise:updated")
|
||||
$scope.$emit("enterprise:updated", $scope.enterprise)
|
||||
$scope.saving = false
|
||||
, (response) ->
|
||||
$scope.saving = false
|
||||
|
||||
@@ -5,25 +5,25 @@ angular.module("admin.enterprises")
|
||||
$scope.select = SideMenu.select
|
||||
|
||||
$scope.menu.setItems [
|
||||
{ name: 'Primary Details', icon_class: "icon-home" }
|
||||
{ name: 'Users', icon_class: "icon-user" }
|
||||
{ name: 'Address', icon_class: "icon-map-marker" }
|
||||
{ name: 'Contact', icon_class: "icon-phone" }
|
||||
{ name: 'Social', icon_class: "icon-twitter" }
|
||||
{ name: 'About', icon_class: "icon-pencil" }
|
||||
{ name: 'Business Details', icon_class: "icon-briefcase" }
|
||||
{ name: 'Images', icon_class: "icon-picture" }
|
||||
{ name: "Properties", icon_class: "icon-tags", show: "showProperties()" }
|
||||
{ name: "Shipping Methods", icon_class: "icon-truck", show: "showShippingMethods()" }
|
||||
{ name: "Payment Methods", icon_class: "icon-money", show: "showPaymentMethods()" }
|
||||
{ name: "Enterprise Fees", icon_class: "icon-tasks", show: "showEnterpriseFees()" }
|
||||
{ name: "Inventory Settings", icon_class: "icon-list-ol", show: "showInventorySettings()" }
|
||||
{ name: "Shop Preferences", icon_class: "icon-shopping-cart", show: "showShopPreferences()" }
|
||||
{ name: 'primary_details', label: t('primary_details'), icon_class: "icon-home" }
|
||||
{ name: 'address', label: t('address'), icon_class: "icon-map-marker" }
|
||||
{ name: 'contact', label: t('contact'), icon_class: "icon-phone" }
|
||||
{ name: 'social', label: t('social'), icon_class: "icon-twitter" }
|
||||
{ name: 'about', label: t('about'), icon_class: "icon-pencil" }
|
||||
{ name: 'business_details', label: t('business_details'), icon_class: "icon-briefcase" }
|
||||
{ name: 'images', label: t('images'), icon_class: "icon-picture" }
|
||||
{ name: 'properties', label: t('properties'), icon_class: "icon-tags", show: "showProperties()" }
|
||||
{ name: 'shipping_methods', label: t('shipping_methods'), icon_class: "icon-truck", show: "showShippingMethods()" }
|
||||
{ name: 'payment_methods', label: t('payment_methods'), icon_class: "icon-money", show: "showPaymentMethods()" }
|
||||
{ name: 'enterprise_fees', label: t('enterprise_fees'), icon_class: "icon-tasks", show: "showEnterpriseFees()" }
|
||||
{ name: 'inventory_settings', label: t('inventory_settings'), icon_class: "icon-list-ol", show: "enterpriseIsShop()" }
|
||||
{ name: 'tag_rules', label: t('tag_rules'), icon_class: "icon-random", show: "enterpriseIsShop()" }
|
||||
{ name: 'shop_preferences', label: t('shop_preferences'), icon_class: "icon-shopping-cart", show: "enterpriseIsShop()" }
|
||||
{ name: 'users', label: t('users'), icon_class: "icon-user" }
|
||||
]
|
||||
|
||||
$scope.select(0)
|
||||
|
||||
|
||||
$scope.showItem = (item) ->
|
||||
if item.show?
|
||||
$parse(item.show)($scope)
|
||||
@@ -42,8 +42,5 @@ angular.module("admin.enterprises")
|
||||
$scope.showEnterpriseFees = ->
|
||||
enterprisePermissions.can_manage_enterprise_fees && ($scope.Enterprise.sells != "none" || $scope.Enterprise.is_primary_producer)
|
||||
|
||||
$scope.showInventorySettings = ->
|
||||
$scope.Enterprise.sells != "none"
|
||||
|
||||
$scope.showShopPreferences = ->
|
||||
$scope.enterpriseIsShop = ->
|
||||
$scope.Enterprise.sells != "none"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
angular.module('admin.enterprises').directive 'enterpriseSwitcher', (NavigationCheck) ->
|
||||
restrict: 'A'
|
||||
require: 'ngModel'
|
||||
link: (scope, element, attr, ngModel) ->
|
||||
initial = element[0].getAttribute('data-initial')
|
||||
|
||||
element.on 'change', ->
|
||||
if not NavigationCheck.confirmLeave()
|
||||
# Reset the current dropdown selection if staying on page
|
||||
ngModel.$setViewValue initial
|
||||
ngModel.$render()
|
||||
element.select2 'val', initial
|
||||
return
|
||||
|
||||
NavigationCheck.clear() # Don't ask twice if leaving
|
||||
window.location = element[0].querySelector('option[selected]').getAttribute('data-url')
|
||||
@@ -1 +1 @@
|
||||
angular.module("admin.enterprises", [
|
||||
angular.module("admin.enterprises", [
|
||||
@@ -1,8 +0,0 @@
|
||||
angular.module("admin.enterprises").factory 'EnterpriseResource', ($resource) ->
|
||||
$resource('/admin/enterprises/:id/:action.json', {}, {
|
||||
'index':
|
||||
method: 'GET'
|
||||
isArray: true
|
||||
'update':
|
||||
method: 'PUT'
|
||||
})
|
||||
@@ -15,7 +15,7 @@ angular.module("admin.indexUtils").directive "objForUpdate", (switchClass, pendi
|
||||
object: scope.object()
|
||||
type: scope.type
|
||||
attr: scope.attr
|
||||
value: value
|
||||
value: if value? then value else ""
|
||||
scope: scope
|
||||
scope.pending()
|
||||
pendingChanges.add(scope.object().id, scope.attr, change)
|
||||
@@ -24,7 +24,7 @@ angular.module("admin.indexUtils").directive "objForUpdate", (switchClass, pendi
|
||||
scope.savedValue = value
|
||||
|
||||
scope.success = ->
|
||||
switchClass( element, "update-success", ["update-pending", "update-error"], 3000 )
|
||||
switchClass( element, "update-success", ["update-pending", "update-error"], 5000 )
|
||||
|
||||
scope.pending = ->
|
||||
switchClass( element, "update-pending", ["update-error", "update-success"], false )
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
angular.module("admin.indexUtils").directive "ofnSelect2", ($sanitize, $timeout) ->
|
||||
angular.module("admin.indexUtils").directive "ofnSelect2", ($sanitize, $timeout, $filter) ->
|
||||
require: 'ngModel'
|
||||
restrict: 'C'
|
||||
scope:
|
||||
data: "="
|
||||
minSearch: "@?"
|
||||
text: "@?"
|
||||
minSearch: "@"
|
||||
text: "@"
|
||||
blank: "=?"
|
||||
filter: "=?"
|
||||
onSelecting: "=?"
|
||||
multiple: '@'
|
||||
link: (scope, element, attrs, ngModel) ->
|
||||
$timeout ->
|
||||
scope.text ||= 'name'
|
||||
scope.data.unshift(scope.blank) if scope.blank? && typeof scope.blank is "object"
|
||||
scope.text ?= 'name'
|
||||
scope.multiple ?= false
|
||||
scope.filter ?= -> true
|
||||
|
||||
item.name = $sanitize(item.name) for item in scope.data
|
||||
element.select2
|
||||
minimumResultsForSearch: scope.minSearch || 0
|
||||
data: { results: scope.data, text: scope.text }
|
||||
initSelection: (element, callback) ->
|
||||
callback scope.data[0]
|
||||
formatSelection: (item) ->
|
||||
item[scope.text]
|
||||
formatResult: (item) ->
|
||||
item[scope.text]
|
||||
if scope.data.$promise
|
||||
scope.data.$promise.then -> init()
|
||||
else
|
||||
init()
|
||||
|
||||
element.on "select2-opening", scope.onSelecting || angular.noop
|
||||
|
||||
attrs.$observe 'disabled', (value) ->
|
||||
element.select2('enable', !value)
|
||||
@@ -28,3 +28,22 @@ angular.module("admin.indexUtils").directive "ofnSelect2", ($sanitize, $timeout)
|
||||
ngModel.$formatters.push (value) ->
|
||||
element.select2('val', value)
|
||||
value
|
||||
|
||||
ngModel.$parsers.push (value) ->
|
||||
return value.split(",") if scope.multiple
|
||||
value
|
||||
|
||||
init = ->
|
||||
scope.data.unshift(scope.blank) if scope.blank? && typeof scope.blank is "object"
|
||||
|
||||
item.name = $sanitize(item.name) for item in scope.data
|
||||
element.select2
|
||||
multiple: scope.multiple
|
||||
minimumResultsForSearch: scope.minSearch || 0
|
||||
data: ->
|
||||
filtered = $filter('filter')(scope.data,scope.filter)
|
||||
{ results: filtered, text: scope.text }
|
||||
formatSelection: (item) ->
|
||||
item[scope.text]
|
||||
formatResult: (item) ->
|
||||
item[scope.text]
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
angular.module("admin.indexUtils").directive "panelCtrl", (Panels) ->
|
||||
restrict: "C"
|
||||
scope:
|
||||
object: "="
|
||||
selected: "@?"
|
||||
controller: ($scope, $element) ->
|
||||
this.toggle = (name) ->
|
||||
Panels.toggle($scope.object, name)
|
||||
|
||||
this.select = (selection) ->
|
||||
$scope.$broadcast("selection:changed", selection)
|
||||
$element.toggleClass("expanded", selection?)
|
||||
|
||||
this.registerSelectionListener = (callback) ->
|
||||
$scope.$on "selection:changed", (event, selection) ->
|
||||
callback(selection)
|
||||
|
||||
this
|
||||
|
||||
link: (scope, element, attrs, ctrl) ->
|
||||
Panels.register(ctrl, scope.object, scope.selected)
|
||||
@@ -1,37 +1,24 @@
|
||||
angular.module("admin.indexUtils").directive "panelRow", (Panels, Columns) ->
|
||||
restrict: "C"
|
||||
require: "^^panelCtrl"
|
||||
templateUrl: "admin/panel.html"
|
||||
scope:
|
||||
object: "="
|
||||
panels: "="
|
||||
link: (scope, element, attrs) ->
|
||||
scope.template = ""
|
||||
selected = null
|
||||
scope.columnCount = Columns.visibleCount
|
||||
colspan: "=?"
|
||||
locals: '@?'
|
||||
link: (scope, element, attrs, ctrl) ->
|
||||
scope.template = null
|
||||
scope.columnCount = (scope.colspan || Columns.visibleCount)
|
||||
|
||||
if scope.locals
|
||||
scope[local] = scope.$parent.$eval(local.trim()) for local in scope.locals.split(',')
|
||||
|
||||
scope.$on "columnCount:changed", (event, count) ->
|
||||
scope.columnCount = count
|
||||
|
||||
setTemplate = ->
|
||||
if selected?
|
||||
scope.template = 'admin/panels/' + scope.panels[selected] + '.html'
|
||||
ctrl.registerSelectionListener (selection) ->
|
||||
if selection?
|
||||
scope.template = "admin/panels/#{scope.panels[selection]}.html"
|
||||
else
|
||||
scope.template = ""
|
||||
|
||||
scope.getSelected = ->
|
||||
selected
|
||||
|
||||
scope.setSelected = (name) ->
|
||||
scope.$apply ->
|
||||
selected = name
|
||||
setTemplate()
|
||||
|
||||
scope.open = (name) ->
|
||||
element.show 0, ->
|
||||
scope.setSelected name
|
||||
|
||||
scope.close = ->
|
||||
element.hide 0, ->
|
||||
scope.setSelected null
|
||||
|
||||
Panels.register(scope.object.id, scope)
|
||||
scope.template = null
|
||||
|
||||
@@ -2,11 +2,13 @@ angular.module("admin.indexUtils").directive "panelToggle", ->
|
||||
restrict: "C"
|
||||
transclude: true
|
||||
template: '<div ng-transclude></div><i class=\'icon-chevron\'></i>'
|
||||
require: "^panelToggleRow"
|
||||
require: "^^panelCtrl"
|
||||
scope:
|
||||
name: "@"
|
||||
link: (scope, element, attrs, ctrl) ->
|
||||
scope.selected = ctrl.register(scope.name, element)
|
||||
|
||||
element.on "click", ->
|
||||
scope.selected = ctrl.select(scope.name)
|
||||
scope.$apply ->
|
||||
ctrl.toggle(scope.name)
|
||||
|
||||
ctrl.registerSelectionListener (selection) ->
|
||||
element.toggleClass('selected', selection == scope.name)
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
angular.module("admin.indexUtils").directive "panelToggleRow", (Panels) ->
|
||||
restrict: "C"
|
||||
scope:
|
||||
object: "="
|
||||
selected: "@?"
|
||||
controller: ($scope) ->
|
||||
panelToggles = {}
|
||||
|
||||
this.register = (name, element) ->
|
||||
panelToggles[name] = element
|
||||
panelToggles[name].addClass("selected") if $scope.selected == name
|
||||
$scope.selected == name
|
||||
|
||||
this.select = (name) ->
|
||||
panelToggle.removeClass("selected") for panelName, panelToggle of panelToggles
|
||||
|
||||
switch $scope.selected = Panels.toggle($scope.object.id, name)
|
||||
when null
|
||||
panelToggles[name].parent(".panel-toggle-row").removeClass("expanded")
|
||||
else
|
||||
panelToggles[$scope.selected].addClass("selected")
|
||||
panelToggles[$scope.selected].parent(".panel-toggle-row").addClass("expanded")
|
||||
|
||||
$scope.selected == name
|
||||
|
||||
this
|
||||
#
|
||||
# link: (scope, element, attrs) ->
|
||||
# Panels.registerInitialSelection(scope.object.id, scope.selected)
|
||||
@@ -0,0 +1,12 @@
|
||||
angular.module("admin.indexUtils").component 'showMore',
|
||||
templateUrl: 'admin/show_more.html'
|
||||
bindings:
|
||||
data: "="
|
||||
limit: "="
|
||||
increment: "="
|
||||
|
||||
# For now, this component is not being used.
|
||||
# Something about binding "data" to a variable on the parent scope that is continually refreshed by
|
||||
# being assigned within an ng-repeat means that we get $digest iteration errors. Seems to be solved
|
||||
# by using the new "as" syntax for ng-repeat to assign and alias the outcome of the filters, but this
|
||||
# has the limitation of not being able to be limited AFTER the assignment has been made, which we need
|
||||
@@ -1,8 +0,0 @@
|
||||
angular.module("admin.indexUtils").directive "toggleColumn", (Columns) ->
|
||||
link: (scope, element, attrs) ->
|
||||
element.addClass "selected" if scope.column.visible
|
||||
|
||||
element.click "click", ->
|
||||
scope.$apply ->
|
||||
Columns.toggleColumn(scope.column)
|
||||
element.toggleClass "selected"
|
||||
@@ -1 +1 @@
|
||||
angular.module("admin.indexUtils", ['ngResource', 'ngSanitize', 'templates']).config ($httpProvider) ->
|
||||
angular.module("admin.indexUtils", ['admin.resources', 'ngSanitize', 'templates', 'admin.utils']).config ($httpProvider) ->
|
||||
@@ -1,13 +1,21 @@
|
||||
angular.module("admin.indexUtils").factory 'Columns', ($rootScope) ->
|
||||
angular.module("admin.indexUtils").factory 'Columns', ($rootScope, $http, $injector) ->
|
||||
new class Columns
|
||||
savedColumns: {}
|
||||
columns: {}
|
||||
visibleCount: 0
|
||||
|
||||
setColumns: (columns) =>
|
||||
constructor: ->
|
||||
@columns = {}
|
||||
@columns[name] = column for name, column of columns
|
||||
for column in @injectColumns()
|
||||
@columns[column.column_name] = column
|
||||
@savedColumns[column.column_name] = angular.copy(column)
|
||||
@calculateVisibleCount()
|
||||
@columns
|
||||
|
||||
injectColumns: ->
|
||||
if $injector.has('columns')
|
||||
$injector.get('columns')
|
||||
else
|
||||
[]
|
||||
|
||||
toggleColumn: (column) =>
|
||||
column.visible = !column.visible
|
||||
@@ -16,3 +24,18 @@ angular.module("admin.indexUtils").factory 'Columns', ($rootScope) ->
|
||||
calculateVisibleCount: =>
|
||||
@visibleCount = (column for name, column of @columns when column.visible).length
|
||||
$rootScope.$broadcast "columnCount:changed", @visibleCount
|
||||
|
||||
preferencesSaved: =>
|
||||
angular.equals(@columns, @savedColumns)
|
||||
|
||||
savePreferences: (action_name) =>
|
||||
$http
|
||||
method: "PUT"
|
||||
url: "/admin/column_preferences/bulk_update"
|
||||
data:
|
||||
action_name: action_name
|
||||
column_preferences: (preference for column_name, preference of @columns)
|
||||
.success (data) =>
|
||||
for column in data
|
||||
angular.extend(@columns[column.column_name], column)
|
||||
angular.extend(@savedColumns[column.column_name], column)
|
||||
|
||||
@@ -3,7 +3,8 @@ angular.module("admin.indexUtils").factory 'Dereferencer', ->
|
||||
dereference: (array, data)->
|
||||
if array
|
||||
for object, i in array
|
||||
array[i] = data[object.id]
|
||||
match = data[object.id]
|
||||
array[i] = match if match?
|
||||
|
||||
dereferenceAttr: (array, attr, data)->
|
||||
if array
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
angular.module("admin.indexUtils").factory 'Panels', ->
|
||||
new class Panels
|
||||
panels: {}
|
||||
panels: []
|
||||
|
||||
register: (id, scope) ->
|
||||
if id? && scope?
|
||||
@panels[id] = scope
|
||||
register: (ctrl, object, selected=null) ->
|
||||
if ctrl? && object?
|
||||
@panels.push { ctrl: ctrl, object: object, selected: selected }
|
||||
ctrl.select(selected) if selected?
|
||||
|
||||
toggle: (id, name) ->
|
||||
scope = @panels[id]
|
||||
selected = scope.getSelected()
|
||||
switch selected
|
||||
when name
|
||||
scope.close()
|
||||
when null
|
||||
scope.open(name)
|
||||
else
|
||||
scope.setSelected(name)
|
||||
scope.getSelected()
|
||||
toggle: (object, name, state=null) ->
|
||||
panel = @findPanelByObject(object)
|
||||
if panel.selected == name
|
||||
@select(panel, null) unless state == "open"
|
||||
else
|
||||
@select(panel, name) unless state == "closed"
|
||||
|
||||
select: (panel, name) ->
|
||||
panel.selected = name
|
||||
panel.ctrl.select(name)
|
||||
|
||||
findPanelByObject: (object) ->
|
||||
(panel for panel in @panels when panel.object == object)[0]
|
||||
|
||||
@@ -1,24 +1,36 @@
|
||||
angular.module("admin.indexUtils").factory "pendingChanges", (resources) ->
|
||||
angular.module("admin.indexUtils").factory "pendingChanges", ($q, resources, StatusMessage) ->
|
||||
new class pendingChanges
|
||||
pendingChanges: {}
|
||||
errors: []
|
||||
|
||||
add: (id, attr, change) =>
|
||||
@pendingChanges["#{id}"] = {} unless @pendingChanges.hasOwnProperty("#{id}")
|
||||
@pendingChanges["#{id}"]["#{attr}"] = change
|
||||
StatusMessage.display('notice', "You have made #{@changeCount(@pendingChanges)} unsaved changes")
|
||||
|
||||
removeAll: =>
|
||||
@pendingChanges = {}
|
||||
StatusMessage.clear()
|
||||
|
||||
|
||||
remove: (id, attr) =>
|
||||
if @pendingChanges.hasOwnProperty("#{id}")
|
||||
delete @pendingChanges["#{id}"]["#{attr}"]
|
||||
delete @pendingChanges["#{id}"] if @changeCount( @pendingChanges["#{id}"] ) < 1
|
||||
|
||||
submitAll: =>
|
||||
submitAll: (form=null) =>
|
||||
all = []
|
||||
@errors = []
|
||||
StatusMessage.display('progress', "Saving...")
|
||||
for id, objectChanges of @pendingChanges
|
||||
for attrName, change of objectChanges
|
||||
all.push @submit(change)
|
||||
$q.all(all).then =>
|
||||
if @errors.length == 0
|
||||
StatusMessage.display('success', "All changes saved successfully")
|
||||
form.$setPristine() if form?
|
||||
else
|
||||
StatusMessage.display('failure', "Oh no! I was unable to save your changes")
|
||||
all
|
||||
|
||||
submit: (change) ->
|
||||
@@ -26,8 +38,12 @@ angular.module("admin.indexUtils").factory "pendingChanges", (resources) ->
|
||||
@remove change.object.id, change.attr
|
||||
change.scope.reset( data["#{change.attr}"] )
|
||||
change.scope.success()
|
||||
, (error) ->
|
||||
, (error) =>
|
||||
@errors.push error
|
||||
change.scope.error()
|
||||
|
||||
unsavedCount: ->
|
||||
Object.keys(@pendingChanges).length
|
||||
|
||||
changeCount: (objectChanges) ->
|
||||
Object.keys(objectChanges).length
|
||||
|
||||