push_type_admin 0.6.0.beta.1 → 0.6.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/push_type/admin.js.coffee +7 -4
  3. data/app/assets/javascripts/push_type/fields/asset_field.js.coffee +2 -1
  4. data/app/assets/javascripts/push_type/fields/date_time_fields.js.coffee +9 -6
  5. data/app/assets/javascripts/push_type/fields/repeater_field.js.coffee +28 -12
  6. data/app/assets/javascripts/push_type/fields/{relation_fields.js.coffee → select_fields.js.coffee} +18 -3
  7. data/app/helpers/push_type/fields_helper.rb +2 -27
  8. data/app/views/push_type/fields/_asset.html.haml +3 -3
  9. data/app/views/push_type/fields/_date.html.haml +1 -1
  10. data/app/views/push_type/fields/_matrix.html.haml +20 -10
  11. data/app/views/push_type/fields/_relation.html.haml +1 -1
  12. data/app/views/push_type/fields/_repeater.html.haml +18 -10
  13. data/app/views/push_type/fields/_select.html.haml +1 -1
  14. data/test/dummy/config/initializers/push_type.rb +1 -1
  15. data/test/dummy/config/secrets.yml +2 -2
  16. data/test/dummy/db/schema.rb +1 -1
  17. data/test/dummy/log/test.log +4520 -4520
  18. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{b9JQPxW4JXsEMPg6IuwbcxAuP2OhDDjLKHRDAmL9gi0.cache → 2EThNHqLu_xwuBEx4vHV3OET28iaKx6e_PUWDDYCfNA.cache} +1 -1
  19. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache +46 -0
  20. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/68-rfVTVnRlWELlXq3fFfQ-DJzuJPuIRXihjH-A4DDw.cache +0 -0
  21. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/8Yus8_gDNuUFZEcVfeXKTB56TPihlWLL6d8qBUtlxhs.cache +0 -0
  22. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{EFi353vPjI0mCdem6bROYjtNuvlKj3EcwMkp5g5Mpj0.cache → 9uv1sZD3AP_O2KaJodca_1LtmauwIODXfzHvRu2G7-c.cache} +1 -1
  23. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/AKNuwBosUS_xVARIwHOtZLhpTj0VGfcpMSDOzY5VYSM.cache +1 -0
  24. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{gTuX3cv-vdz9qv8gNX5F84Ei5mIJttVCsJjrqv4Np5g.cache → CASd7mtaP88OldKeSPlNlSe5Z0rXQDEwSVTCfeSoblw.cache} +1 -1
  25. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/FtlieXse4_zwRlqG_RseVlz-TXIop-wClSIXiGyCa-k.cache +0 -0
  26. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/GSuwmAmknqPxy3lOcjsmOG1cGtWUAK67WCqDt3pWc0E.cache +0 -0
  27. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/NOLzY4N8876kNz0nVXOuWtF5FApAsa9NO-e4quADtHM.cache +1 -0
  28. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{WzG6jRDGbAJ41fKtKf8Rmip8oknkkLAfWgvOd0kkgjY.cache → RZ7U3cmHsXIKt6ekhKZP6Pw8KEtCwk7Hy9HViUWfQj0.cache} +2 -1
  29. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Ti3ckxVqeNRd1ShfRfv4oOZZ8Boq8qKJB6y_Fv9ytU0.cache +0 -0
  30. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{4AF6EbpH49NMHFQdc9OnIUfkRLM8lKlSBqaBvUVo3KM.cache → Uh8MXM6z2fmNXc4sqqPfSRoLUQPEFMEmu2Ifr44NsEc.cache} +1 -1
  31. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{VkZ0DGEafpmCHjq-WFxDxbu3tQIQdddqOV-7qXmT_Js.cache → VT4ptrpfuw0joWBCiDIXoO5_j6knZOUqsEHVhSzZDug.cache} +0 -0
  32. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Z1wb-zyOfM070cy_9rtWent0zzV8LZK8Sj8a3WfQhps.cache +0 -0
  33. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Za-bWpyPHwDgncSmeFii-kf2OBoGGfM9hq7a2ek4UB0.cache +0 -0
  34. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{bn4g9rKX92aXFOIF45FlF5DA0zMZCBDpiTSbD55ZsWA.cache → Zy6nYRgc2MyEGXCZnYSq-m1aAY44ChWxkTH6HT8TdOU.cache} +0 -0
  35. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/_lObpVI6whu6Za3BTLG5Hx8sNP9CVQ3ZMVzzdeK0NTQ.cache +2 -0
  36. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{pbDdMevTripqjdLgZ-5gJL5yJ9u8_WN_wvD-2bDKchs.cache → fUjwjDI8TTWz2HrWHI5JMUs6j5Zhhpt4gu6RUqI_mUI.cache} +1 -1
  37. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oGabhBAYxeJ2uXArE6IRQrs9lp2BEAwkEQNAVAlZJr8.cache +1 -0
  38. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/o_4u5rpJosTLleHQ6oFN50tkbxKhh8vZ-pV_WowjSHI.cache +1 -0
  39. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oa9cqTFdyQ42k9Pg0lPDUvvUhMMoQ_GRclViUq6uaRg.cache +0 -0
  40. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/t3hCHk9ruCftcpXnkKI-fJNua82etX3bwNBEUtZ9lto.cache +1 -0
  41. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/vcC8Jy6hXCQmtvaDthKUCjhefi2JHvMcweAO6q6iCrQ.cache +30 -0
  42. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{hHilQ4bcUd8onLMrObWVvrbBXGQji2ic5mYuEwKnnNY.cache → xW0MZCmr6qsKPiKHi-p_tpm4quTg9MjmOa-Od5_rIU4.cache} +10 -3
  43. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/y-lokYJWyt-TTTl8aQ5SR0Bjp8EDmS6mpAPPdm__J0w.cache +0 -0
  44. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{tli_LD_p18lfhUBkYvg05DnTi6ub4yzVxobMsgAhJ80.cache → yVAlvXhvMp6zOjyiiyQBHnvrEidq7VqKYL8AtUH97uY.cache} +1 -1
  45. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{oPvGci8wIDxeMOWgaH9tg9cmiw_uXWAnEgNSB1G36C4.cache → zU6SWg93-hpgJyTjFP15NSTMQgfkIQ0RK2aq5zpJXaQ.cache} +30 -4
  46. metadata +83 -116
  47. data/app/assets/javascripts/push_type/fields/matrix_field.js.coffee +0 -15
  48. data/app/assets/javascripts/push_type/fields/select_field.js.coffee +0 -6
  49. data/app/assets/javascripts/push_type/fields/tag_list_field.js.coffee +0 -7
  50. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/0Mgh5nyc3Pzes6lDtGL-Gv6ROsVKBh0lUsGUKzXw9kc.cache +0 -1
  51. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1bVhd3dFMo9Ta1ZpKfvQhdvM5qaev4RvY_3DMATQbrM.cache +0 -0
  52. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1nNN5hiPJhSBFbXuNhBFG9MAnwLc93VFIaeblAGZ3To.cache +0 -1
  53. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/5P1BK5rrkt_pXJofFRcpFsmzd_MJW8pl403ygUGDDxs.cache +0 -0
  54. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/5eYnCJcXnQkAOctRXxDskITlrtsk7nrYlEf8qxbEpgo.cache +0 -2
  55. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/5qCJaEhgPbRPDUGCudAamasvrzwHon7PLBJ3kPdq21s.cache +0 -1
  56. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/8OSaAe5xd1TtBUWFtqunZLYGKr-iTN8p_PgoaSfNjB4.cache +0 -2
  57. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/AFosvpRRM0x48rPHPouVE6eBrYZY6rcsRuUatpTfJzY.cache +0 -10
  58. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/EfhRYuSCpVmiWXUWtbKDKzGwk58paaV2GPb4_rREQPg.cache +0 -2
  59. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/H3uM2R6qlfQ8WXNmFFe23Sw3CSzcZm5YubuWd5pUIQA.cache +0 -0
  60. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/KYdGQ31taQ80bQiRyD5P527fNvIZmseD3OPEXwkWAYE.cache +0 -1
  61. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Nut9NY263iE2JHbMgV8KTaKMThqrxHG242447k_-VG4.cache +0 -1
  62. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/PJ2ondm6na55yEj8Q6fzW4hErJNAV0hEJpN9a04eZ6I.cache +0 -1
  63. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/PLJqtbGuGip_S21FMzWEwuL8tHSd3_L_e9lBchsOD_Q.cache +0 -0
  64. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/YFAro2UoBm8P_QlrbBg2oTTP4EJddGbzgT_-7tFdP9M.cache +0 -11
  65. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/YNPSWoHxiTzJIdNt3nDkJQuR60jdFqw58LfFMz2WUkE.cache +0 -0
  66. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/YiHXNl-e6pgl9d3wk6J5jSq2zt9W9tmKloipy49G6XE.cache +0 -1
  67. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/cgRz1kQTuswK7Bo8D5znvQXHywdhrORz5fWIydag1F0.cache +0 -21
  68. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/e6yFwTLDDEwVn9G3mpsV_5f5r68_Ht5HSyOBjhhrioY.cache +0 -1
  69. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hHoFdLF-c8SLdDf6BH8UmOS6j1HFnvT40DiKakWrRJE.cache +0 -1
  70. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ij1h-nsseqe7QjynUzOIy_ewVf4ChzVoR2uAAuEvjCY.cache +0 -0
  71. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/jKX8VTCvXUSDC6yVThQiAX_wf1EWIkrZDhShrJnpFbQ.cache +0 -21
  72. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/kpJyJzfaviaCFO-XtHlJ7f40Em4nABVAVQHoqQHzzeA.cache +0 -0
  73. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/mZf34r0DjzryIiaM7TY7d5qOdD02esR0mCd6sNH3r-k.cache +0 -0
  74. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/muDDpoKNrUnYa7QCaUYWGeiwHFzO5RDGJUA-wj606Bs.cache +0 -1
  75. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/rpmymrTDaltDPEmKOAQPQ2FObPIrhRDS-6ImndpqPb0.cache +0 -17
  76. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/sEa2reB8yNAAce0aN3ByKwFb1NmMmqK3hh9CDh6wYdA.cache +0 -1
  77. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/t_gbM3iDelNCbFx1f94Th2HHAAEr9E6mgKDWru8YYpI.cache +0 -0
  78. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/wHBZ11mt80O4IBCWSmsX_xLwmIgkoS-zXRE2O80Jg-4.cache +0 -0
  79. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/y3KGeoqel0zi9J24AzufRd1-enK-SZMtCdTOxn3pxHQ.cache +0 -1
  80. /data/test/dummy/db/migrate/{20151015181712_create_push_type_users.push_type.rb → 20151102165855_create_push_type_users.push_type.rb} +0 -0
  81. /data/test/dummy/db/migrate/{20151015181713_create_push_type_nodes.push_type.rb → 20151102165856_create_push_type_nodes.push_type.rb} +0 -0
  82. /data/test/dummy/db/migrate/{20151015181714_create_push_type_node_hierarchies.push_type.rb → 20151102165857_create_push_type_node_hierarchies.push_type.rb} +0 -0
  83. /data/test/dummy/db/migrate/{20151015181715_create_push_type_assets.push_type.rb → 20151102165858_create_push_type_assets.push_type.rb} +0 -0
  84. /data/test/dummy/db/migrate/{20151015181716_create_push_type_taxonomies.push_type.rb → 20151102165859_create_push_type_taxonomies.push_type.rb} +0 -0
  85. /data/test/dummy/db/migrate/{20151015181717_create_push_type_taxonomy_hierarchies.push_type.rb → 20151102165860_create_push_type_taxonomy_hierarchies.push_type.rb} +0 -0
  86. /data/test/dummy/db/migrate/{20151015181718_add_field_store_default_values.push_type.rb → 20151102165861_add_field_store_default_values.push_type.rb} +0 -0
  87. /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{b_s0LvGnXotYeP7ueqwDIpeRe_32gsm1zkbeE2UmozQ.cache → A3QMbn17wDkitGAvrQzrM5Yvwc4n485nbIme7P3pipI.cache} +0 -0
  88. /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{UXhmsxcPbGcG36Pk6KUujzn9noRkcRgGOohZ8wP8O58.cache → JWU4QAKxpGFz1WxBsIoXKK6IH5hWAZ6ulEAwKiOz1X4.cache} +0 -0
  89. /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{5fEpjdfAeqZsIjcnsi0MPOE80IWL2sGRCSSxfUUIIoM.cache → Lix1By3vZQ-BSL0QFJuiriDgj0L7Tl9DD-8Feoiaa-Q.cache} +0 -0
  90. /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{PghaRuu1VpTYo6FSvTUg-wiFBQhv4uj69lpKjI6JjKQ.cache → emReUhkfaQkbNvBYnI2hyBwbph-vKsk323NNnNZP2v0.cache} +0 -0
  91. /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{DlH-DnEsmWl8jIHY3k5keLk6ZTl0UcGFooi9qEQzg0Q.cache → nhJuId471nk5_X22-JkYdy2xSm6cLXff_H6Xt5COar8.cache} +0 -0
  92. /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{uZWjCUafkm7SECxzLEtFxy5P7sfw2rYKt8yN59KJ42Q.cache → uWg65r77iUJib7MTS9pw5aH9FKMjlzUSRKBD331BPtI.cache} +0 -0
@@ -1,2 +1,2 @@
1
1
  [o:Set:
2
- @hash{ I"environment-version:ETTI"environment-paths;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"{file-digest:///Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/fields/select_field.js.coffee;TT
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"|file-digest:///Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/fields/select_fields.js.coffee;TT
@@ -0,0 +1,46 @@
1
+ I"�(function() {
2
+ this.app.directive('repeaterField', [
3
+ '$compile', '$timeout', function($compile, $timeout) {
4
+ return {
5
+ restrict: 'A',
6
+ scope: true,
7
+ link: function($scope, $el, $attrs) {
8
+ var $rows, template;
9
+ $rows = $('.rows', $el);
10
+ template = $('.template', $el).text();
11
+ $scope.addRow = function() {
12
+ var $dom, $row, uid;
13
+ uid = Math.uid();
14
+ $row = $(template);
15
+ $row.attr('data-uid', uid);
16
+ $rows.append($row);
17
+ $dom = $("[data-uid='" + uid + "']", $rows);
18
+ $compile($dom)($scope);
19
+ $timeout(function() {
20
+ return $dom.trigger('init.fndtn');
21
+ });
22
+ return true;
23
+ };
24
+ if (!$rows.children().length) {
25
+ return $scope.addRow();
26
+ }
27
+ }
28
+ };
29
+ }
30
+ ]);
31
+
32
+ this.app.directive('repeaterRow', function() {
33
+ return {
34
+ restrict: 'A',
35
+ scope: true,
36
+ link: function($scope, $el, $attrs) {
37
+ return $scope.removeRow = function() {
38
+ $el.remove();
39
+ return true;
40
+ };
41
+ }
42
+ };
43
+ });
44
+
45
+ }).call(this);
46
+ :ET
@@ -1 +1 @@
1
- I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/fields/asset_field.js.coffee?type=application/javascript&pipeline=self&id=5c6969d8710e69ecc51cfcd3e64cda500b19a093123fdb7ac5ccfda6672ad7b7:ET
1
+ I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/fields/asset_field.js.coffee?type=application/javascript&pipeline=self&id=efd2822f3e9a57d69cc5ffc9da59c241bca7b6a596203090c5534254fd4f03af:ET
@@ -0,0 +1 @@
1
+ "%�~tl�ϐ����T/�f)��5V7I�G\����
@@ -1 +1 @@
1
- I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/fields/repeater_field.js.coffee?type=application/javascript&pipeline=self&id=c8ebf591feb371e05fa713d232f2573522dcc80d578ba0ab84da45cf48ed8ec3:ET
1
+ I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/fields/repeater_field.js.coffee?type=application/javascript&pipeline=self&id=f626b032e4b177fd50e842e503d5f05e3ca6ff5aba3445ce3ed0c993b81b6c8f:ET
@@ -0,0 +1 @@
1
+ "%p�:Y���H��ϠZ��~�����%�۲����
@@ -1,9 +1,10 @@
1
- I"�(function() {
1
+ I"�(function() {
2
2
  this.app.controller('AssetFieldCtrl', [
3
3
  '$scope', '$http', function($scope, $http) {
4
4
  $scope.$modal = null;
5
5
  $scope.assets = [];
6
6
  $scope.meta = {};
7
+ $scope.uid = 'asset-' + Math.uid();
7
8
  $scope.loadAssets = function(page) {
8
9
  var config, req;
9
10
  config = page != null ? {
@@ -1 +1 @@
1
- I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/admin.js.coffee?type=application/javascript&id=7807d311adfddd08ccfef477121ea103363f7372d51d4fa3e3169a2e3be53d3e:ET
1
+ I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/admin.js.coffee?type=application/javascript&id=a7290e9a68bcacf4b79beb0a0b8637bc418a5e6f0616fe99de1e9d7f15ab9550:ET
@@ -0,0 +1,2 @@
1
+ "%�n�(IJ�[� ;�i�/��脮 �=
2
+ �ֽ{��p
@@ -1 +1 @@
1
- I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/admin.js.coffee?type=application/javascript&pipeline=self&id=0252ca42b722a1def43049f11e61db494ce7cdf53af5510804be09122648a2fa:ET
1
+ I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/admin.js.coffee?type=application/javascript&pipeline=self&id=77d9b3604423c14c0081fcc7e2d29b4a9465f77aeac22cf702a937350dfc916e:ET
@@ -0,0 +1 @@
1
+ "%�0V�9��Ji%�a�0�+\�ˌ�i@yv�7B�
@@ -0,0 +1 @@
1
+ I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/fields/select_fields.js.coffee?type=application/javascript&pipeline=self&id=75e0e4990f866339e0de6ffb31b4d15fb662cea143402004160b333edfbcea2e:ET
@@ -0,0 +1 @@
1
+ "%��I�>i��� �Ne܁#o��:̙[�6�
@@ -0,0 +1,30 @@
1
+ I"M(function() {
2
+ var opts;
3
+
4
+ opts = {
5
+ date: {
6
+ format: 'd mmmm yyyy',
7
+ formatSubmit: 'yyyy-mm-dd',
8
+ hiddenName: true
9
+ },
10
+ time: {
11
+ format: 'h:i A',
12
+ formatSubmit: 'HH:i',
13
+ formatLabel: 'h:i A <sm!all>HH:i</sm!all>',
14
+ hiddenName: true
15
+ }
16
+ };
17
+
18
+ this.app.directive('pickadate', function() {
19
+ return function($scope, $el, $attrs) {
20
+ switch ($attrs['pickadate']) {
21
+ case 'date':
22
+ return $($el).pickadate(opts.date);
23
+ case 'time':
24
+ return $($el).pickatime(opts.time);
25
+ }
26
+ };
27
+ });
28
+
29
+ }).call(this);
30
+ :ET
@@ -1,6 +1,10 @@
1
- I"V(function() {
1
+ I"#(function() {
2
2
  Turbolinks.enableProgressBar();
3
3
 
4
+ Math.uid = function() {
5
+ return Math.floor(Math.random() * 16777215).toString(16);
6
+ };
7
+
4
8
  this.app = angular.module('push_type', ['ui.tree']);
5
9
 
6
10
  this.app.run([
@@ -21,9 +25,12 @@
21
25
  });
22
26
 
23
27
  $(document).on('ready page:load', function() {
24
- $(document).foundation();
25
- $(document).confirmWithReveal();
28
+ $(document).on('init.fndtn', function(a, b, c) {
29
+ $(a.target).foundation();
30
+ return $(a.target).confirmWithReveal();
31
+ });
26
32
  angular.bootstrap($('[role="main"]'), ['push_type']);
33
+ $(document).trigger('init.fndtn');
27
34
  return $('.node-list.sortable').sortable({
28
35
  handle: '.handle',
29
36
  forcePlaceholderSize: true
@@ -1 +1 @@
1
- I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/fields/date_time_fields.js.coffee?type=application/javascript&pipeline=self&id=ab5ea64cf6edc8d3b872a4607c72267ea138ca6a2364585f662abc14c0de83b4:ET
1
+ I"�/Users/aaron/dev/pushcode/push_type/admin/app/assets/javascripts/push_type/fields/date_time_fields.js.coffee?type=application/javascript&pipeline=self&id=307d5c6cb20e9689d1125d77b95512e7efe40b9660d18b5f58d0569ce7d33528:ET
@@ -1,6 +1,17 @@
1
- I"�(function() {
2
- $(document).on('ready page:load', function() {
3
- return $('select', '.relation, .node, .taxonomy').selectize({
1
+ I"�(function() {
2
+ var opts;
3
+
4
+ opts = {
5
+ select: {
6
+ plugins: ['remove_button'],
7
+ hideSelected: false
8
+ },
9
+ tag_list: {
10
+ plugins: ['remove_button', 'drag_drop'],
11
+ create: true,
12
+ persist: false
13
+ },
14
+ relation: {
4
15
  plugins: ['remove_button'],
5
16
  hideSelected: false,
6
17
  onInitialize: function() {
@@ -26,7 +37,22 @@
26
37
  return "<div class=\"option\">" + pre + (esc(item.text)) + "</div>";
27
38
  }
28
39
  }
29
- });
40
+ }
41
+ };
42
+
43
+ this.app.directive('selectize', function() {
44
+ return function($scope, $el, $attrs) {
45
+ switch ($attrs['selectize']) {
46
+ case 'select':
47
+ return $($el).selectize(opts.select);
48
+ case 'tag_list':
49
+ return $($el).selectize(opts.tag_list);
50
+ case 'relation':
51
+ case 'node':
52
+ case 'taxonomy':
53
+ return $($el).selectize(opts.relation);
54
+ }
55
+ };
30
56
  });
31
57
 
32
58
  }).call(this);