tb_media 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +28 -0
  4. data/Readme.markdown +73 -0
  5. data/app/assets/images/spud/admin/files_thumbs/dat_thumb.png +0 -0
  6. data/app/assets/images/spud/admin/files_thumbs/doc_thumb.png +0 -0
  7. data/app/assets/images/spud/admin/files_thumbs/jpg_thumb.png +0 -0
  8. data/app/assets/images/spud/admin/files_thumbs/mp3_thumb.png +0 -0
  9. data/app/assets/images/spud/admin/files_thumbs/pdf_thumb.png +0 -0
  10. data/app/assets/images/spud/admin/files_thumbs/png_thumb.png +0 -0
  11. data/app/assets/images/spud/admin/files_thumbs/ppt_thumb.png +0 -0
  12. data/app/assets/images/spud/admin/files_thumbs/txt_thumb.png +0 -0
  13. data/app/assets/images/spud/admin/files_thumbs/xls_thumb.png +0 -0
  14. data/app/assets/images/spud/admin/files_thumbs/zip_thumb.png +0 -0
  15. data/app/assets/images/spud/admin/media/checkers.jpg +0 -0
  16. data/app/assets/images/spud/admin/media_thumb.png +0 -0
  17. data/app/assets/images/spud/admin/media_thumb@2x.png +0 -0
  18. data/app/assets/images/spud/admin/media_tiny.png +0 -0
  19. data/app/assets/javascripts/spud/admin/media/application.js +175 -0
  20. data/app/assets/javascripts/spud/admin/media/picker.js +219 -0
  21. data/app/assets/javascripts/spud/admin/media/plugin.js +99 -0
  22. data/app/assets/libs/jcrop/css/Jcrop.gif +0 -0
  23. data/app/assets/libs/jcrop/css/jquery.Jcrop.css +165 -0
  24. data/app/assets/libs/jcrop/css/jquery.Jcrop.min.css +29 -0
  25. data/app/assets/libs/jcrop/js/jquery.Jcrop.js +1694 -0
  26. data/app/assets/libs/jcrop/js/jquery.Jcrop.min.js +22 -0
  27. data/app/assets/libs/jcrop/js/jquery.color.js +661 -0
  28. data/app/assets/libs/jcrop/js/jquery.min.js +4 -0
  29. data/app/assets/libs/tiny_mce/plugins/spud_media/blank.htm +12 -0
  30. data/app/assets/libs/tiny_mce/plugins/spud_media/css/template.css +23 -0
  31. data/app/assets/libs/tiny_mce/plugins/spud_media/editor_plugin.js +1 -0
  32. data/app/assets/libs/tiny_mce/plugins/spud_media/editor_plugin_src.js +159 -0
  33. data/app/assets/libs/tiny_mce/plugins/spud_media/js/template.js +106 -0
  34. data/app/assets/libs/tiny_mce/plugins/spud_media/langs/en_dlg.js +1 -0
  35. data/app/assets/libs/tiny_mce/plugins/spud_media/template.htm +31 -0
  36. data/app/assets/stylesheets/spud/admin/media/application.css +103 -0
  37. data/app/assets/stylesheets/spud/admin/media/plugin.css +154 -0
  38. data/app/controllers/protected_media_controller.rb +26 -0
  39. data/app/controllers/spud/admin/media_controller.rb +73 -0
  40. data/app/controllers/spud/admin/media_picker_controller.rb +28 -0
  41. data/app/helpers/protected_media_helper.rb +3 -0
  42. data/app/helpers/spud/admin/users_helper.rb +2 -0
  43. data/app/helpers/spud/user_sessions_helper.rb +2 -0
  44. data/app/models/spud_media.rb +154 -0
  45. data/app/views/spud/admin/media/edit.html.erb +50 -0
  46. data/app/views/spud/admin/media/index.html.erb +37 -0
  47. data/app/views/spud/admin/media/new.html.erb +26 -0
  48. data/app/views/spud/admin/media_picker/_media.html.erb +19 -0
  49. data/app/views/spud/admin/media_picker/create.html.erb +1 -0
  50. data/app/views/spud/admin/media_picker/create.js.erb +1 -0
  51. data/app/views/spud/admin/media_picker/index.html.erb +103 -0
  52. data/config/routes.rb +13 -0
  53. data/db/migrate/20120101194256_create_spud_media.rb +11 -0
  54. data/db/migrate/20120501203325_add_protected_to_spud_media.rb +6 -0
  55. data/db/migrate/20120508132153_add_cropping_to_spud_media.rb +9 -0
  56. data/lib/spud_media/configuration.rb +11 -0
  57. data/lib/spud_media/engine.rb +16 -0
  58. data/lib/spud_media/version.rb +5 -0
  59. data/lib/tasks/spud_media_tasks.rake +15 -0
  60. data/lib/tb_media.rb +6 -0
  61. metadata +257 -0
@@ -0,0 +1,165 @@
1
+ /* jquery.Jcrop.css v0.9.12 - MIT License */
2
+ /*
3
+ The outer-most container in a typical Jcrop instance
4
+ If you are having difficulty with formatting related to styles
5
+ on a parent element, place any fixes here or in a like selector
6
+
7
+ You can also style this element if you want to add a border, etc
8
+ A better method for styling can be seen below with .jcrop-light
9
+ (Add a class to the holder and style elements for that extended class)
10
+ */
11
+ .jcrop-holder {
12
+ direction: ltr;
13
+ text-align: left;
14
+ }
15
+ /* Selection Border */
16
+ .jcrop-vline,
17
+ .jcrop-hline {
18
+ background: #ffffff url("Jcrop.gif");
19
+ font-size: 0;
20
+ position: absolute;
21
+ }
22
+ .jcrop-vline {
23
+ height: 100%;
24
+ width: 1px !important;
25
+ }
26
+ .jcrop-vline.right {
27
+ right: 0;
28
+ }
29
+ .jcrop-hline {
30
+ height: 1px !important;
31
+ width: 100%;
32
+ }
33
+ .jcrop-hline.bottom {
34
+ bottom: 0;
35
+ }
36
+ /* Invisible click targets */
37
+ .jcrop-tracker {
38
+ height: 100%;
39
+ width: 100%;
40
+ /* "turn off" link highlight */
41
+ -webkit-tap-highlight-color: transparent;
42
+ /* disable callout, image save panel */
43
+ -webkit-touch-callout: none;
44
+ /* disable cut copy paste */
45
+ -webkit-user-select: none;
46
+ }
47
+ /* Selection Handles */
48
+ .jcrop-handle {
49
+ background-color: #333333;
50
+ border: 1px #eeeeee solid;
51
+ width: 7px;
52
+ height: 7px;
53
+ font-size: 1px;
54
+ }
55
+ .jcrop-handle.ord-n {
56
+ left: 50%;
57
+ margin-left: -4px;
58
+ margin-top: -4px;
59
+ top: 0;
60
+ }
61
+ .jcrop-handle.ord-s {
62
+ bottom: 0;
63
+ left: 50%;
64
+ margin-bottom: -4px;
65
+ margin-left: -4px;
66
+ }
67
+ .jcrop-handle.ord-e {
68
+ margin-right: -4px;
69
+ margin-top: -4px;
70
+ right: 0;
71
+ top: 50%;
72
+ }
73
+ .jcrop-handle.ord-w {
74
+ left: 0;
75
+ margin-left: -4px;
76
+ margin-top: -4px;
77
+ top: 50%;
78
+ }
79
+ .jcrop-handle.ord-nw {
80
+ left: 0;
81
+ margin-left: -4px;
82
+ margin-top: -4px;
83
+ top: 0;
84
+ }
85
+ .jcrop-handle.ord-ne {
86
+ margin-right: -4px;
87
+ margin-top: -4px;
88
+ right: 0;
89
+ top: 0;
90
+ }
91
+ .jcrop-handle.ord-se {
92
+ bottom: 0;
93
+ margin-bottom: -4px;
94
+ margin-right: -4px;
95
+ right: 0;
96
+ }
97
+ .jcrop-handle.ord-sw {
98
+ bottom: 0;
99
+ left: 0;
100
+ margin-bottom: -4px;
101
+ margin-left: -4px;
102
+ }
103
+ /* Dragbars */
104
+ .jcrop-dragbar.ord-n,
105
+ .jcrop-dragbar.ord-s {
106
+ height: 7px;
107
+ width: 100%;
108
+ }
109
+ .jcrop-dragbar.ord-e,
110
+ .jcrop-dragbar.ord-w {
111
+ height: 100%;
112
+ width: 7px;
113
+ }
114
+ .jcrop-dragbar.ord-n {
115
+ margin-top: -4px;
116
+ }
117
+ .jcrop-dragbar.ord-s {
118
+ bottom: 0;
119
+ margin-bottom: -4px;
120
+ }
121
+ .jcrop-dragbar.ord-e {
122
+ margin-right: -4px;
123
+ right: 0;
124
+ }
125
+ .jcrop-dragbar.ord-w {
126
+ margin-left: -4px;
127
+ }
128
+ /* The "jcrop-light" class/extension */
129
+ .jcrop-light .jcrop-vline,
130
+ .jcrop-light .jcrop-hline {
131
+ background: #ffffff;
132
+ filter: alpha(opacity=70) !important;
133
+ opacity: .70!important;
134
+ }
135
+ .jcrop-light .jcrop-handle {
136
+ -moz-border-radius: 3px;
137
+ -webkit-border-radius: 3px;
138
+ background-color: #000000;
139
+ border-color: #ffffff;
140
+ border-radius: 3px;
141
+ }
142
+ /* The "jcrop-dark" class/extension */
143
+ .jcrop-dark .jcrop-vline,
144
+ .jcrop-dark .jcrop-hline {
145
+ background: #000000;
146
+ filter: alpha(opacity=70) !important;
147
+ opacity: 0.7 !important;
148
+ }
149
+ .jcrop-dark .jcrop-handle {
150
+ -moz-border-radius: 3px;
151
+ -webkit-border-radius: 3px;
152
+ background-color: #ffffff;
153
+ border-color: #000000;
154
+ border-radius: 3px;
155
+ }
156
+ /* Simple macro to turn off the antlines */
157
+ .solid-line .jcrop-vline,
158
+ .solid-line .jcrop-hline {
159
+ background: #ffffff;
160
+ }
161
+ /* Fix for twitter bootstrap et al. */
162
+ .jcrop-holder img,
163
+ img.jcrop-preview {
164
+ max-width: none;
165
+ }
@@ -0,0 +1,29 @@
1
+ /* jquery.Jcrop.min.css v0.9.12 (build:20130126) */
2
+ .jcrop-holder{direction:ltr;text-align:left;}
3
+ .jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif);font-size:0;position:absolute;}
4
+ .jcrop-vline{height:100%;width:1px!important;}
5
+ .jcrop-vline.right{right:0;}
6
+ .jcrop-hline{height:1px!important;width:100%;}
7
+ .jcrop-hline.bottom{bottom:0;}
8
+ .jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
9
+ .jcrop-handle{background-color:#333;border:1px #EEE solid;font-size:1px;height:7px;width:7px;}
10
+ .jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
11
+ .jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
12
+ .jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
13
+ .jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
14
+ .jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
15
+ .jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
16
+ .jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
17
+ .jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
18
+ .jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
19
+ .jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
20
+ .jcrop-dragbar.ord-n{margin-top:-4px;}
21
+ .jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
22
+ .jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
23
+ .jcrop-dragbar.ord-w{margin-left:-4px;}
24
+ .jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:alpha(opacity=70)!important;opacity:.70!important;}
25
+ .jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
26
+ .jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important;}
27
+ .jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
28
+ .solid-line .jcrop-vline,.solid-line .jcrop-hline{background:#FFF;}
29
+ .jcrop-holder img,img.jcrop-preview{max-width:none;}