ample_assets 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.textile +68 -0
  3. data/Rakefile +38 -0
  4. data/app/assets/images/ample_assets/bg-noise.png +0 -0
  5. data/app/assets/images/ample_assets/btn-next.png +0 -0
  6. data/app/assets/images/ample_assets/btn-prev.png +0 -0
  7. data/app/assets/images/ample_assets/btn-select-files.png +0 -0
  8. data/app/assets/images/ample_assets/cancel.png +0 -0
  9. data/app/assets/images/ample_assets/closelabel.png +0 -0
  10. data/app/assets/images/ample_assets/collapse.png +0 -0
  11. data/app/assets/images/ample_assets/gravity.png +0 -0
  12. data/app/assets/images/ample_assets/icon_other.gif +0 -0
  13. data/app/assets/images/ample_assets/icon_pdf.gif +0 -0
  14. data/app/assets/images/ample_assets/icon_swf.gif +0 -0
  15. data/app/assets/images/ample_assets/loading.gif +0 -0
  16. data/app/assets/images/ample_assets/play.png +0 -0
  17. data/app/assets/images/ample_assets/prev-next.png +0 -0
  18. data/app/assets/images/ample_assets/reload.png +0 -0
  19. data/app/assets/images/ample_assets/remove.png +0 -0
  20. data/app/assets/javascripts/ample_assets.js +1 -0
  21. data/app/assets/javascripts/ample_assets/application.js +18 -0
  22. data/app/assets/javascripts/ample_assets/classes/ample_assets_gravity.js.coffee +86 -0
  23. data/app/assets/javascripts/ample_assets/classes/ample_assets_toolbar.js.coffee +769 -0
  24. data/app/assets/javascripts/ample_assets/classes/ample_assets_uploadify.js.coffee +30 -0
  25. data/app/assets/javascripts/ample_assets/files.js.coffee +5 -0
  26. data/app/assets/stylesheets/ample_assets.css +3 -0
  27. data/app/assets/stylesheets/ample_assets/application.css +8 -0
  28. data/app/assets/stylesheets/ample_assets/bourbon/css3/_border-radius.scss +59 -0
  29. data/app/assets/stylesheets/ample_assets/bourbon/css3/_box-shadow.scss +11 -0
  30. data/app/assets/stylesheets/ample_assets/custom_mixins.scss +47 -0
  31. data/app/assets/stylesheets/ample_assets/facebox.css +79 -0
  32. data/app/assets/stylesheets/ample_assets/files.css.scss +750 -0
  33. data/app/assets/swf/ample_assets/expressInstall.swf +0 -0
  34. data/app/assets/swf/ample_assets/uploadify.swf +0 -0
  35. data/app/controllers/ample_assets/application_controller.rb +4 -0
  36. data/app/controllers/ample_assets/files_controller.rb +109 -0
  37. data/app/helpers/ample_assets/application_helper.rb +4 -0
  38. data/app/models/ample_assets/file.rb +79 -0
  39. data/app/views/ample_assets/files/_drop.html.erb +12 -0
  40. data/app/views/ample_assets/files/_file.html.erb +1 -0
  41. data/app/views/ample_assets/files/_file.js.erb +3 -0
  42. data/app/views/ample_assets/files/index.html.erb +6 -0
  43. data/app/views/ample_assets/files/new.html.erb +21 -0
  44. data/app/views/ample_assets/files/recent.html.erb +1 -0
  45. data/app/views/ample_assets/files/show.html.erb +1 -0
  46. data/app/views/layouts/ample_assets/application.html.erb +14 -0
  47. data/config/routes.rb +27 -0
  48. data/lib/ample_assets.rb +26 -0
  49. data/lib/ample_assets/configuration.rb +73 -0
  50. data/lib/ample_assets/custom_processor.rb +29 -0
  51. data/lib/ample_assets/devise_constraint.rb +9 -0
  52. data/lib/ample_assets/engine.rb +36 -0
  53. data/lib/ample_assets/form_builder.rb +19 -0
  54. data/lib/ample_assets/form_helper.rb +14 -0
  55. data/lib/ample_assets/plugin_methods.rb +11 -0
  56. data/lib/ample_assets/version.rb +3 -0
  57. data/lib/ample_assets/view_helper.rb +80 -0
  58. data/lib/generators/ample_assets/install_generator.rb +25 -0
  59. data/lib/generators/ample_assets/templates/migration.rb +16 -0
  60. data/lib/generators/ample_assets/utils.rb +15 -0
  61. data/test/dummy/Rakefile +7 -0
  62. data/test/dummy/app/assets/images/rails.png +0 -0
  63. data/test/dummy/app/assets/javascripts/application.js +11 -0
  64. data/test/dummy/app/assets/sample.pdf +0 -0
  65. data/test/dummy/app/assets/stylesheets/application.css +8 -0
  66. data/test/dummy/app/controllers/application_controller.rb +7 -0
  67. data/test/dummy/app/controllers/public/pages_controller.rb +32 -0
  68. data/test/dummy/app/controllers/public_controller.rb +6 -0
  69. data/test/dummy/app/helpers/application_helper.rb +11 -0
  70. data/test/dummy/app/models/page.rb +7 -0
  71. data/test/dummy/app/views/layouts/application.html.erb +17 -0
  72. data/test/dummy/app/views/public/index.html.erb +0 -0
  73. data/test/dummy/app/views/public/pages/_form.html.erb +18 -0
  74. data/test/dummy/app/views/public/pages/edit.html.erb +1 -0
  75. data/test/dummy/app/views/public/pages/index.html.erb +8 -0
  76. data/test/dummy/app/views/public/pages/new.html.erb +1 -0
  77. data/test/dummy/app/views/public/pages/show.html.erb +3 -0
  78. data/test/dummy/config.ru +4 -0
  79. data/test/dummy/config/application.rb +45 -0
  80. data/test/dummy/config/boot.rb +10 -0
  81. data/test/dummy/config/database.yml +25 -0
  82. data/test/dummy/config/environment.rb +5 -0
  83. data/test/dummy/config/environments/development.rb +30 -0
  84. data/test/dummy/config/environments/production.rb +60 -0
  85. data/test/dummy/config/environments/test.rb +39 -0
  86. data/test/dummy/config/initializers/ample_assets.rb +4 -0
  87. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  88. data/test/dummy/config/initializers/inflections.rb +10 -0
  89. data/test/dummy/config/initializers/mime_types.rb +5 -0
  90. data/test/dummy/config/initializers/secret_token.rb +7 -0
  91. data/test/dummy/config/initializers/session_store.rb +8 -0
  92. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  93. data/test/dummy/config/locales/en.yml +5 -0
  94. data/test/dummy/config/routes.rb +8 -0
  95. data/test/dummy/db/migrate/20120105034123_create_pages.rb +9 -0
  96. data/test/dummy/db/migrate/20120106192233_create_ample_assets_tables.rb +16 -0
  97. data/test/dummy/db/schema.rb +37 -0
  98. data/test/dummy/public/404.html +26 -0
  99. data/test/dummy/public/422.html +26 -0
  100. data/test/dummy/public/500.html +26 -0
  101. data/test/dummy/public/favicon.ico +0 -0
  102. data/test/dummy/script/rails +6 -0
  103. data/test/functional/ample_assets/files_controller_test.rb +49 -0
  104. data/test/integration/ample_assets/admin_test.rb +96 -0
  105. data/test/integration/ample_assets/public_test.rb +7 -0
  106. data/test/integration_test_helper.rb +24 -0
  107. data/test/test_helper.rb +25 -0
  108. data/test/unit/ample_assets/configuration_test.rb +35 -0
  109. data/test/unit/ample_assets/file_test.rb +14 -0
  110. data/test/unit/ample_assets/plugin_methods_test.rb +30 -0
  111. data/test/unit/helpers/ample_assets/form_builder_test.rb +11 -0
  112. data/test/unit/helpers/ample_assets/form_helper_test.rb +23 -0
  113. data/test/unit/helpers/ample_assets/view_helper_test.rb +128 -0
  114. metadata +395 -0
@@ -0,0 +1,30 @@
1
+ # **AmpleAssets** is drag and drop file management for Rails applications.
2
+ #
3
+ class window.AmpleAssetsUploadify extends CoffeeCup
4
+
5
+ init: ->
6
+ @log "init()"
7
+ @html()
8
+
9
+ html: ->
10
+ @log "html()"
11
+ csrf_token = $('meta[name=csrf-token]').attr('content')
12
+ csrf_param = $('meta[name=csrf-param]').attr('content')
13
+ auth_token = $('meta[name=auth-token]').attr('content')
14
+ uploadify_script_data = {}
15
+ uploadify_script_data[csrf_param] = encodeURIComponent(encodeURIComponent(csrf_token))
16
+ uploadify_script_data['auth_token'] = auth_token
17
+ $('#uploadify').uploadify
18
+ 'uploader': '/assets/ample_assets/uploadify.swf'
19
+ 'script': "#{ample_assets.mount_at}files"
20
+ 'cancelImg': '/assets/ample_assets/cancel.png'
21
+ 'buttonImg': '/assets/ample_assets/btn-select-files.png'
22
+ 'height': 34
23
+ 'scriptData': uploadify_script_data
24
+ 'queueID': 'fileQueue'
25
+ 'auto': true
26
+ 'multi': true
27
+ 'wmode': 'transparent'
28
+ 'onAllComplete': ->
29
+ $('body').trigger('ample_uploadify.complete');
30
+
@@ -0,0 +1,5 @@
1
+ $ ->
2
+
3
+ if typeof ample_assets != 'undefined'
4
+ new AmpleAssetsToolbar pages: ample_assets.pages unless ample_assets.load == false
5
+
@@ -0,0 +1,3 @@
1
+ /**
2
+ *= require ./ample_assets/application
3
+ */
@@ -0,0 +1,8 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
8
+
@@ -0,0 +1,59 @@
1
+ @mixin border-radius ($radii) {
2
+ -webkit-border-radius: $radii;
3
+ -moz-border-radius: $radii;
4
+ -ms-border-radius: $radii;
5
+ -o-border-radius: $radii;
6
+ border-radius: $radii;
7
+ }
8
+
9
+ @mixin border-top-left-radius($radii) {
10
+ -webkit-border-top-left-radius: $radii;
11
+ -moz-border-top-left-radius: $radii;
12
+ -ms-border-top-left-radius: $radii;
13
+ -o-border-top-left-radius: $radii;
14
+ border-top-left-radius: $radii;
15
+ }
16
+
17
+ @mixin border-top-right-radius($radii) {
18
+ -webkit-border-top-right-radius: $radii;
19
+ -moz-border-top-right-radius: $radii;
20
+ -ms-border-top-right-radius: $radii;
21
+ -o-border-top-right-radius: $radii;
22
+ border-top-right-radius: $radii;
23
+ }
24
+
25
+ @mixin border-bottom-left-radius($radii) {
26
+ -webkit-border-bottom-left-radius: $radii;
27
+ -moz-border-bottom-left-radius: $radii;
28
+ -ms-border-bottom-left-radius: $radii;
29
+ -o-border-bottom-left-radius: $radii;
30
+ border-bottom-left-radius: $radii;
31
+ }
32
+
33
+ @mixin border-bottom-right-radius($radii) {
34
+ -webkit-border-bottom-right-radius: $radii;
35
+ -moz-border-bottom-right-radius: $radii;
36
+ -ms-border-bottom-right-radius: $radii;
37
+ -o-border-bottom-right-radius: $radii;
38
+ border-bottom-right-radius: $radii;
39
+ }
40
+
41
+ @mixin border-top-radius($radii) {
42
+ @include border-top-left-radius($radii);
43
+ @include border-top-right-radius($radii);
44
+ }
45
+
46
+ @mixin border-right-radius($radii) {
47
+ @include border-top-right-radius($radii);
48
+ @include border-bottom-right-radius($radii);
49
+ }
50
+
51
+ @mixin border-bottom-radius($radii) {
52
+ @include border-bottom-left-radius($radii);
53
+ @include border-bottom-right-radius($radii);
54
+ }
55
+
56
+ @mixin border-left-radius($radii) {
57
+ @include border-top-left-radius($radii);
58
+ @include border-bottom-left-radius($radii);
59
+ }
@@ -0,0 +1,11 @@
1
+ // Box-Shadow Mixin Requires Sass v3.1.1+
2
+ @mixin box-shadow ($shadows)
3
+ {
4
+ $full: $shadows;
5
+
6
+ -webkit-box-shadow: $full;
7
+ -moz-box-shadow: $full;
8
+ -ms-box-shadow: $full;
9
+ -o-box-shadow: $full;
10
+ box-shadow: $full;
11
+ }
@@ -0,0 +1,47 @@
1
+ // ------------------------------------------------------ //
2
+ // MATH & LAYOUT //
3
+ // ------------------------------------------------------ //
4
+
5
+ @function calc-em($target-px, $context) {
6
+ @return ($target-px / $context) * 1em;
7
+ }
8
+
9
+ @mixin clearfix {
10
+ &:after {
11
+ content: ".";
12
+ display: block;
13
+ height: 0;
14
+ clear: both;
15
+ visibility: hidden;
16
+ }
17
+ }
18
+
19
+ // ------------------------------------------------------ //
20
+ // Background/Colors //
21
+ // ------------------------------------------------------ //
22
+
23
+ @mixin imprint {
24
+ background: #141414;
25
+ background: -moz-linear-gradient(top, #141414 0%, #070707 100%);
26
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#141414), color-stop(100%,#070707));
27
+ background: -webkit-linear-gradient(top, #141414 0%,#070707 100%);
28
+ background: -o-linear-gradient(top, #141414 0%,#070707 100%);
29
+ background: -ms-linear-gradient(top, #141414 0%,#070707 100%);
30
+ background: linear-gradient(top, #141414 0%,#070707 100%);
31
+
32
+ @include box-shadow((inset rgba(0,0,0,1) 1px 2px 3px));
33
+
34
+ border-bottom: 1px solid rgba(255,255,255,.2);
35
+ }
36
+
37
+ // ------------------------------------------------------ //
38
+ // Bourbon Mixins: //
39
+ // Taken from thoughtbot's bourbon gem, //
40
+ // found here: https://github.com/thoughtbot/bourbon //
41
+ // ------------------------------------------------------ //
42
+
43
+ // ---- Box Shadow ------------------------------------ //
44
+ @import 'bourbon/css3/box-shadow';
45
+
46
+ // ---- Border Radius --------------------------------- //
47
+ @import 'bourbon/css3/border-radius';
@@ -0,0 +1,79 @@
1
+ #facebox {
2
+ position: absolute;
3
+ top: 0;
4
+ left: 0;
5
+ z-index: 100;
6
+ text-align: left;
7
+ }
8
+
9
+
10
+ #facebox .popup{
11
+ position:relative;
12
+ border:3px solid rgba(0,0,0,0);
13
+ -webkit-border-radius:5px;
14
+ -moz-border-radius:5px;
15
+ border-radius:5px;
16
+ -webkit-box-shadow:0 0 18px rgba(0,0,0,0.4);
17
+ -moz-box-shadow:0 0 18px rgba(0,0,0,0.4);
18
+ box-shadow:0 0 18px rgba(0,0,0,0.4);
19
+ }
20
+
21
+ #facebox .content {
22
+ display:table;
23
+ width: 370px;
24
+ background: #fff;
25
+ -webkit-border-radius:4px;
26
+ -moz-border-radius:4px;
27
+ border-radius:4px;
28
+ }
29
+
30
+ #facebox .content > p:first-child{
31
+ margin-top:0;
32
+ }
33
+ #facebox .content > p:last-child{
34
+ margin-bottom:0;
35
+ }
36
+
37
+ #facebox .close{
38
+ position:absolute;
39
+ top:5px;
40
+ right:5px;
41
+ padding:2px;
42
+ background:#fff;
43
+ }
44
+ #facebox .close img{
45
+ opacity:0.3;
46
+ }
47
+ #facebox .close:hover img{
48
+ opacity:1.0;
49
+ }
50
+
51
+ #facebox .loading {
52
+ text-align: center;
53
+ }
54
+
55
+ #facebox .image {
56
+ text-align: center;
57
+ }
58
+
59
+ #facebox img {
60
+ border: 0;
61
+ margin: 0;
62
+ }
63
+
64
+ #facebox_overlay {
65
+ position: fixed;
66
+ top: 0px;
67
+ left: 0px;
68
+ height:100%;
69
+ width:100%;
70
+ }
71
+
72
+ .facebox_hide {
73
+ z-index:-100;
74
+ }
75
+
76
+ .facebox_overlayBG {
77
+ background-color: #000;
78
+ z-index: 99;
79
+ }
@@ -0,0 +1,750 @@
1
+ /* ------------------------------------------- */
2
+ /* VARIABLES & SETUP */
3
+ /* ------------------------------------------- */
4
+
5
+ /* Primary Typography configuration */
6
+ $font-family : Helvetica, "Helvetica Neue", Arial, sans-serif;
7
+ $base-font-size : 16px;
8
+ $text-highlight-color : #1b6fc0;
9
+ $text-error-color : #c00d0d;
10
+
11
+ /* Border-radius configuration */
12
+ $border-radius : 3px;
13
+
14
+ /* Asset border configuration */
15
+ $asset-border-color : #999999;
16
+ $asset-border : 3px solid $asset-border-color;
17
+ $asset-border-hover : 3px solid #FFF;
18
+
19
+ @import 'custom_mixins';
20
+
21
+ /* ------------------------------------------- */
22
+ /* WEBKIT ANIMATIONS */
23
+ /* ------------------------------------------- */
24
+
25
+ @-webkit-keyframes pulse_target {
26
+ 0% {
27
+ @include box-shadow((inset rgba(0,0,0,.2) 0 2px 4px, rgba(29,160,0, 1) 0 0 16px));
28
+ }
29
+ 50% {
30
+ @include box-shadow((inset rgba(0,0,0,.2) 0 2px 4px, rgba(29,160,0, .5) 0 0 6px));
31
+ }
32
+ 100% {
33
+ @include box-shadow((inset rgba(0,0,0,.2) 0 2px 4px, rgba(29,160,0, 1) 0 0 16px));
34
+ }
35
+ } // pulse animation
36
+
37
+ @-webkit-keyframes pulse_success {
38
+ 0% {
39
+ @include box-shadow((inset rgba(0,0,0,.2) 0 2px 4px, rgba(62,110,155, 1) 0 0 16px));
40
+ }
41
+ 50% {
42
+ @include box-shadow((inset rgba(0,0,0,.2) 0 2px 4px, rgba(62,110,155, .5) 0 0 6px));
43
+ }
44
+ 100% {
45
+ @include box-shadow((inset rgba(0,0,0,.2) 0 2px 4px, rgba(62,110,155, 1) 0 0 16px));
46
+ }
47
+ }
48
+
49
+ .asset-drop-target {
50
+ &.asset-success {
51
+ color: #FFF;
52
+ text-shadow: rgba(0,0,0,1) 0 -1px 0;
53
+
54
+ border: 1px solid #3e6e9b;
55
+
56
+ background: #3e6e9b;
57
+ background: -moz-linear-gradient(top, #3e6e9b 0%, #124d87 100%);
58
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3e6e9b), color-stop(100%,#124d87));
59
+ background: -webkit-linear-gradient(top, #3e6e9b 0%,#124d87 100%);
60
+ background: -o-linear-gradient(top, #3e6e9b 0%,#124d87 100%);
61
+ background: -ms-linear-gradient(top, #3e6e9b 0%,#124d87 100%);
62
+ background: linear-gradient(top, #3e6e9b 0%,#124d87 100%);
63
+
64
+ -webkit-animation-name: pulse_success;
65
+ -webkit-animation-duration: 1s;
66
+ -webkit-animation-timing-function: ease-in-out;
67
+ -webkit-animation-iteration-count: infinite;
68
+ } //success
69
+
70
+ &, &.asset-inactive-target {
71
+ border: 1px solid #3e7532;
72
+ background: #6ca852;
73
+ background: -moz-linear-gradient(top, #6ca852 0%, #3e7532 100%);
74
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6ca852), color-stop(100%,#3e7532));
75
+ background: -webkit-linear-gradient(top, #6ca852 0%,#3e7532 100%);
76
+ background: -o-linear-gradient(top, #6ca852 0%,#3e7532 100%);
77
+ background: -ms-linear-gradient(top, #6ca852 0%,#3e7532 100%);
78
+ background: linear-gradient(top, #6ca852 0%,#3e7532 100%);
79
+ -webkit-animation-name: pulse_target;
80
+ -webkit-animation-duration: 1s;
81
+ -webkit-animation-timing-function: ease-in-out;
82
+ -webkit-animation-iteration-count: infinite;
83
+ }
84
+ }
85
+
86
+ /* ------------------------------------------- */
87
+ /* TOP FORM ELEMENTS */
88
+ /* ------------------------------------------- */
89
+
90
+ .asset-drop {
91
+ font-family: $font-family;
92
+ font-size: $base-font-size;
93
+ clear: both;
94
+ text-align: center;
95
+ .droppable {
96
+ width: calc-em(75px, $base-font-size);
97
+ height: calc-em(75px, $base-font-size);
98
+ margin: 0 0 calc-em(20px, $base-font-size);
99
+ border: 1px solid #A5A5A5;
100
+
101
+ background: #eeeeee;
102
+ background: -moz-linear-gradient(top, #eeeeee 0%, #c6c6c6 100%);
103
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#c6c6c6));
104
+ background: -webkit-linear-gradient(top, #eeeeee 0%,#c6c6c6 100%);
105
+ background: -o-linear-gradient(top, #eeeeee 0%,#c6c6c6 100%);
106
+ background: -ms-linear-gradient(top, #eeeeee 0%,#c6c6c6 100%);
107
+ background: linear-gradient(top, #eeeeee 0%,#c6c6c6 100%);
108
+
109
+ @include border-radius(1px);
110
+
111
+ @include box-shadow(inset rgba(0,0,0,.2) 0 2px 4px);
112
+ span {
113
+ display: block;
114
+ margin: calc-em(21px, 12px) 0 0 0;
115
+
116
+ font-weight: bold;
117
+ color: darken(#c6c6c6, 35%);
118
+ font-size: calc-em(12px, $base-font-size);
119
+ line-height: calc-em(21px, 12px);
120
+ text-shadow: rgba(0,0,0,.05) 0 -1px 0, rgba(255,255,255,1) 0 1px 0;
121
+ } //span
122
+
123
+
124
+
125
+ &.asset-drop-target {
126
+ border: 1px solid #3e7532;
127
+
128
+ background: #6ca852;
129
+ background: -moz-linear-gradient(top, #6ca852 0%, #3e7532 100%);
130
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6ca852), color-stop(100%,#3e7532));
131
+ background: -webkit-linear-gradient(top, #6ca852 0%,#3e7532 100%);
132
+ background: -o-linear-gradient(top, #6ca852 0%,#3e7532 100%);
133
+ background: -ms-linear-gradient(top, #6ca852 0%,#3e7532 100%);
134
+ background: linear-gradient(top, #6ca852 0%,#3e7532 100%);
135
+
136
+
137
+ -webkit-animation-name: pulse_target;
138
+ -webkit-animation-duration: 1s;
139
+ -webkit-animation-timing-function: ease-in-out;
140
+ -webkit-animation-iteration-count: infinite;
141
+
142
+ span {
143
+ color: darken(#3e7532, 15%);
144
+ text-shadow: rgba(0,0,0,.05) 0 -1px 0, rgba(255,255,255,.3) 0 1px 0;
145
+ } //span
146
+
147
+ &.asset-success {
148
+ border: 1px solid #3e6e9b;
149
+
150
+ background: #3e6e9b;
151
+ background: -moz-linear-gradient(top, #3e6e9b 0%, #124d87 100%);
152
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3e6e9b), color-stop(100%,#124d87));
153
+ background: -webkit-linear-gradient(top, #3e6e9b 0%,#124d87 100%);
154
+ background: -o-linear-gradient(top, #3e6e9b 0%,#124d87 100%);
155
+ background: -ms-linear-gradient(top, #3e6e9b 0%,#124d87 100%);
156
+ background: linear-gradient(top, #3e6e9b 0%,#124d87 100%);
157
+
158
+ -webkit-animation-name: pulse_success;
159
+ -webkit-animation-duration: 1s;
160
+ -webkit-animation-timing-function: ease-in-out;
161
+ -webkit-animation-iteration-count: infinite;
162
+ } //success
163
+
164
+ } //asset-drop-target
165
+
166
+ .draggable {
167
+ img {
168
+ border: none;
169
+ }
170
+ }
171
+ } //droppable
172
+
173
+ .asset-action {
174
+ display: block;
175
+ text-indent: -9999px;
176
+ width: calc-em(20px, $base-font-size);
177
+ height: calc-em(20px, $base-font-size);
178
+ position: absolute;
179
+ margin-left: calc-em(65px, $base-font-size);
180
+ margin-top: calc-em(65px, $base-font-size);
181
+ &.asset-select {
182
+ margin-top: calc-em(20px, $base-font-size);
183
+ } //asset-select
184
+ } //asset-action
185
+
186
+ .asset-remove {
187
+ background: url("/assets/ample_assets/remove.png") no-repeat top left;
188
+ &.hide {
189
+ display: none;
190
+ } //hide
191
+ } //asset-remove
192
+
193
+ } //asset-drop
194
+
195
+ #asset-gravity-handle {
196
+ background: url('/assets/ample_assets/gravity.png') no-repeat 0 0;
197
+ width: 50px;
198
+ height: 50px;
199
+ cursor: move;
200
+ }
201
+
202
+ .asset-selection,
203
+ .asset-detail {
204
+ font-family: $font-family;
205
+ font-size: $base-font-size;
206
+ margin-top: 20px;
207
+ padding: 15px 10px 10px;
208
+ width: 540px;
209
+ div.asset-media {
210
+ width: 480px;
211
+ text-align: center;
212
+ padding: 20px;
213
+ background: #f2f2f2;
214
+ border: 1px solid #d4d4d4;
215
+ } //asset-media
216
+ .asset-detail {
217
+ margin-top: 0;
218
+ padding-top: 0;
219
+ padding-bottom: 0;
220
+ } //asset-details
221
+ } //asset-detail
222
+
223
+ .asset-detail {
224
+ font-size: $base-font-size * 0.8;
225
+ .asset-delete {
226
+ float: right;
227
+ margin: 10px 20px 0 0;
228
+ background: url('/assets/ample_assets/remove.png') no-repeat center left;
229
+ padding: 5px 0 5px 25px;
230
+ color: #91291a;
231
+ text-decoration: none;
232
+ font-weight: bold;
233
+ }
234
+ #asset-gravity-notification {
235
+ background: #60b84b;
236
+ border: 1px solid #509940;
237
+ color: #FFF;
238
+ padding: 3px 10px;
239
+ margin: 3px 0 5px 0;
240
+ width: 502px;
241
+ font-weight: bold;
242
+ text-align: center;
243
+ display: none;
244
+ }
245
+ hr {
246
+ width: 520px;
247
+ margin: 0 0 10px;
248
+ padding: 0;
249
+ border: none;
250
+ color: #D4D4D4;
251
+ background-color: #D4D4D4;
252
+ height: 1px;
253
+ }
254
+ ul {
255
+ margin: 0;
256
+ padding: 0;
257
+ list-style-type: none;
258
+ }
259
+ li {
260
+ color: #999;
261
+ }
262
+ }
263
+
264
+ .asset-selection {
265
+ @include clearfix;
266
+ min-height: 0;
267
+ font-size: $base-font-size * 0.8;
268
+ margin-top: 0;
269
+ padding-top: 0;
270
+ padding-bottom: 0;
271
+ div.asset-media {
272
+ width: 140px;
273
+ min-height: 0;
274
+ } //asset-media
275
+ p {
276
+ text-transform: capitalize;
277
+ margin-top: 0;
278
+ span {
279
+ padding: 0 5px;
280
+ font-size: $base-font-size * 0.65;
281
+ }
282
+ } //p
283
+ hr.space {
284
+ visibility: hidden;
285
+ clear: both;
286
+ } //space
287
+ label {
288
+ font-weight: bold;
289
+ } //label
290
+ input#asset-width,
291
+ input#asset-alt,
292
+ input#asset-height {
293
+ padding: calc-em(5px, 13px) calc-em(5px, 13px);
294
+ margin: 0;
295
+ border: 1px solid rgba(0,0,0,.4);
296
+ width: calc-em(39px, 13px);
297
+ font-size: calc-em(12px, $base-font-size);
298
+ text-align: center;
299
+ } //asset-height, asset-width
300
+ input#asset-alt {
301
+ margin-top: 10px;
302
+ width: auto;
303
+ text-align: left;
304
+ }
305
+ .asset-media,
306
+ .asset-dimensions {
307
+ float: left;
308
+ } //asset-media
309
+ .asset-dimensions {
310
+ width: 285px;
311
+ padding: 0 20px;
312
+ } //asset-dimensions
313
+ } //asset-selection
314
+
315
+ textarea {
316
+ &.drag-notice {
317
+ border: 1px solid #3e7532;
318
+ }
319
+ } //textarea
320
+
321
+ #pdf {
322
+ width: 480px;
323
+ height: 300px;
324
+ padding: 20px;
325
+ background: #f2f2f2;
326
+ border: 1px solid #d4d4d4;
327
+ } //pdf
328
+
329
+ /* ------------------------------------------- */
330
+ /* ASSET MANAGER */
331
+ /* ------------------------------------------- */
332
+
333
+ #ample-assets-handle {
334
+ font-family: $font-family;
335
+ font-size: $base-font-size;
336
+ outline: none;
337
+ padding: calc-em(10px, 13px) calc-em(20px, 13px);
338
+ cursor: pointer;
339
+ background: #2B2B2B url('/assets/ample_assets/bg-noise.png') repeat top left;
340
+
341
+ color: #FFF;
342
+ font-size: calc-em(13px, $base-font-size);
343
+ font-weight: bold;
344
+ text-decoration: none;
345
+ text-shadow: rgba(0,0,0,1) 0 -1px 0, rgba(255,255,255,.1) 0 1px 0;
346
+
347
+ @include border-top-left-radius(6px);
348
+ @include box-shadow((rgba(0,0,0,.2) 0 -1px 2px, inset rgba(255,255,255,.2) 0 2px 0, inset rgba(255,255,255,.1) 2px 0 0));
349
+
350
+ } //handle
351
+
352
+
353
+ #ample-assets {
354
+ font-family: $font-family;
355
+ font-size: $base-font-size;
356
+ position: fixed;
357
+ left: 0;
358
+ bottom: 0;
359
+ width: 100%;
360
+ height: 0;
361
+
362
+ .container {
363
+ width: 950px;
364
+ margin: 0 auto;
365
+ } //container
366
+
367
+ .background {
368
+ clear: both;
369
+ background: #2b2b2b url('/assets/ample_assets/bg-noise.png') repeat top left;
370
+ background: url('/assets/ample_assets/bg-noise.png') repeat top left, -moz-linear-gradient(top, #2b2b2b 0%, #191919 44%, #111111 100%);
371
+ background: url('/assets/ample_assets/bg-noise.png') repeat top left, -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2b2b2b), color-stop(44%,#191919), color-stop(100%,#111111));
372
+ background: url('/assets/ample_assets/bg-noise.png') repeat top left, -webkit-linear-gradient(top, #2b2b2b 0%,#191919 44%,#111111 100%);
373
+ background: url('/assets/ample_assets/bg-noise.png') repeat top left, -o-linear-gradient(top, #2b2b2b 0%,#191919 44%,#111111 100%);
374
+ background: url('/assets/ample_assets/bg-noise.png') repeat top left, -ms-linear-gradient(top, #2b2b2b 0%,#191919 44%,#111111 100%);
375
+ background: url('/assets/ample_assets/bg-noise.png') repeat top left, linear-gradient(top, #2b2b2b 0%,#191919 44%,#111111 100%);
376
+
377
+ @include box-shadow((rgba(0,0,0,.2) 0 -1px 2px, inset rgba(255,255,255,.2) 0 2px 0, inset rgba(255,255,255,.1) 2px 0 0));
378
+
379
+ } //background
380
+
381
+ // ---- Ample Panels Styles ------------------------------------ //
382
+
383
+ .collapse {
384
+ float: right;
385
+ position: relative;
386
+ right: 0;
387
+ background: url('/assets/ample_assets/collapse.png') no-repeat center center;
388
+ display: block;
389
+ width: 12px;
390
+ height: 12px;
391
+ padding: 10px;
392
+ text-indent: -99999em;
393
+ }
394
+
395
+ .pages {
396
+ width: 100%;
397
+ margin-top: calc-em($base-font-size, $base-font-size);
398
+ } //pages
399
+
400
+ .page {
401
+ @include clearfix;
402
+ &.panels {
403
+ border: none;
404
+ @include imprint;
405
+
406
+ width: calc-em(940px,$base-font-size);
407
+ margin: 0 auto;
408
+ padding: calc-em(16px, $base-font-size) 0;
409
+
410
+ @include border-radius($border-radius);
411
+
412
+ } //panels
413
+
414
+ ul {
415
+ margin: 0;
416
+ padding: 0;
417
+ } //ul
418
+
419
+ } //page
420
+
421
+ // ---- Pagination Controls ------------------------------------ //
422
+ .controls {
423
+ @include clearfix;
424
+ display: none;
425
+ position: absolute;
426
+ width: calc-em(950px, $base-font-size);
427
+ margin: calc-em(-70px, $base-font-size) 0 0 0;
428
+ .previous,
429
+ .next {
430
+ position: relative;
431
+ text-indent: -9999px;
432
+ width:15px;
433
+ height:27px;
434
+ }
435
+ .previous {
436
+ float: left;
437
+ background: url('/assets/ample_assets/btn-prev.png') no-repeat top left;
438
+ } //previous
439
+ .next {
440
+ float: right;
441
+ background: url('/assets/ample_assets/btn-next.png') no-repeat top left;
442
+ } //next
443
+ } //controls
444
+
445
+
446
+
447
+ .ampn {
448
+ margin-left: calc-em(14px, $base-font-size);
449
+ position: relative;
450
+ z-index: 100;
451
+ .empty {
452
+ color: #D4D4D4;
453
+ font-size: 14px;
454
+ text-align: center;
455
+ padding: calc-em(36px, $base-font-size);
456
+ a {
457
+ color: #7799b8;
458
+ text-decoration: none;
459
+ &:hover {
460
+ text-decoration: underline;
461
+ } //hover
462
+ } //a
463
+ } //empty
464
+ } //ampn
465
+
466
+ // ---- Search Box ------------------------------------ //
467
+
468
+ .asset-search {
469
+ @include clearfix;
470
+ float: right;
471
+ margin: calc-em(10px, $base-font-size) 0 0 0;
472
+ width: calc-em(295px, $base-font-size);
473
+
474
+ @include imprint;
475
+
476
+ @include border-radius(4px);
477
+
478
+ @include box-shadow((inset rgba(0,0,0,1) 1px 2px 3px, inset rgba(255,255,255,.15) 0 -1px 0));
479
+ border-top: none;
480
+ border-bottom: none;
481
+
482
+ input {
483
+ color: #FFF;
484
+
485
+ float: left;
486
+ padding: calc-em(7px, 12px) calc-em(5px, 12px) calc-em(6px, 12px);
487
+ margin: 0;
488
+
489
+ background: none;
490
+ border: none;
491
+
492
+ width: calc-em(210px, 12px);
493
+ font-size: calc-em(12px, $base-font-size);
494
+
495
+ @include border-left-radius(4px);
496
+
497
+ } //input
498
+
499
+ label {
500
+ border-left: 1px solid #000;
501
+ border-bottom: 1px solid #000;
502
+ float: right;
503
+ display: block;
504
+ padding: 0 calc-em(14px, 13px);
505
+ line-height: calc-em(28px, 13px);
506
+
507
+ font-size: calc-em(13px, $base-font-size);
508
+
509
+ color: #FFF;
510
+ text-shadow: rgba(0,0,0,1) 0 -1px 0;
511
+
512
+ background: #3e6e9b;
513
+ background: -moz-linear-gradient(top, #3e6e9b 0%, #124d87 100%);
514
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3e6e9b), color-stop(100%,#124d87));
515
+ background: -webkit-linear-gradient(top, #3e6e9b 0%,#124d87 100%);
516
+ background: -o-linear-gradient(top, #3e6e9b 0%,#124d87 100%);
517
+ background: -ms-linear-gradient(top, #3e6e9b 0%,#124d87 100%);
518
+ background: linear-gradient(top, #3e6e9b 0%,#124d87 100%);
519
+
520
+ @include border-right-radius(4px);
521
+ @include box-shadow((inset rgba(255,255,255,.3) 0 1px 0, inset rgba(255,255,255,.1) -1px 0 0, rgba(0,0,0,.4) -2px 0 1px));
522
+
523
+ } //label
524
+
525
+
526
+
527
+ } //asset-search
528
+
529
+ .container {
530
+ width: 950px;
531
+ margin: 0 auto;
532
+ } //container
533
+
534
+ .asset-pages {
535
+ width: 100%;
536
+ } //asset-pages
537
+
538
+ .assets-empty {
539
+ display: none;
540
+ } //assets-empty
541
+
542
+
543
+ .page {
544
+ @include clearfix;
545
+ &.panels {
546
+ width: calc-em(930px,$base-font-size);
547
+ margin: 0 auto;
548
+ padding: calc-em(16px, $base-font-size) 0;
549
+ @include border-radius(4px);
550
+ border: none;
551
+ border-bottom: 1px solid rgba(255,255,255,.2);
552
+
553
+ background: #141414;
554
+ background: -moz-linear-gradient(top, #141414 0%, #070707 100%);
555
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#141414), color-stop(100%,#070707));
556
+ background: -webkit-linear-gradient(top, #141414 0%,#070707 100%);
557
+ background: -o-linear-gradient(top, #141414 0%,#070707 100%);
558
+ background: -ms-linear-gradient(top, #141414 0%,#070707 100%);
559
+ background: linear-gradient(top, #141414 0%,#070707 100%);
560
+ @include box-shadow((inset rgba(0,0,0,1) 1px 2px 3px));
561
+ } //panels
562
+ ul {
563
+ display: none;
564
+ margin: 0;
565
+ padding: 0;
566
+ } //ul
567
+ } //page
568
+
569
+ .tabs {
570
+ @include clearfix;
571
+ padding-top: 2px;
572
+ text-shadow: rgba(0,0,0,1) 0 -1px 0, rgba(255,255,255,.1) 0 1px 0;
573
+ font-weight: bold;
574
+ padding: 0 calc-em(11px, $base-font-size);
575
+ span.asset-loading {
576
+ display: none;
577
+ float: left;
578
+ background: url('/assets/ample_assets/loading.gif') no-repeat center center;
579
+ width: calc-em(20px, 13px);
580
+ height: calc-em(20px, 13px);
581
+ margin: calc-em(10px, 13px) 0 0 calc-em(10px, 13px);
582
+ } //asset-loading
583
+ .asset-results {
584
+ display: none;
585
+ } //asset-results
586
+ } //tabs
587
+
588
+ a.assets-reload,
589
+ a.tab {
590
+ float: left;
591
+ display: block;
592
+ outline: none;
593
+ margin: calc-em(10px, 13px) 0 0 calc-em(10px, 13px);
594
+ padding: 0 calc-em(14px, 13px);
595
+ border: 1px solid #000;
596
+
597
+ color: #FFF;
598
+ font-size: calc-em(13px, $base-font-size);
599
+ line-height: calc-em(26px, 13px);
600
+ text-decoration: none;
601
+ text-shadow: rgba(0,0,0,1) 0 1px 0;
602
+
603
+ @include border-radius($border-radius);
604
+
605
+ background: #333333;
606
+ background: -moz-linear-gradient(top, #333333 0%, #1c1c1c 100%);
607
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#333333), color-stop(100%,#1c1c1c));
608
+ background: -webkit-linear-gradient(top, #333333 0%,#1c1c1c 100%);
609
+ background: -o-linear-gradient(top, #333333 0%,#1c1c1c 100%);
610
+ background: -ms-linear-gradient(top, #333333 0%,#1c1c1c 100%);
611
+ background: linear-gradient(top, #333333 0%,#1c1c1c 100%);
612
+
613
+ @include box-shadow((inset rgba(255,255,255,.1) 0 1px 0, inset rgba(255,255,255,.1) -1px 0 0, inset rgba(255,255,255,.1) 1px 0 0, rgba(0,0,0,.6) 0 1px 2px));
614
+
615
+ &.on, &:active {
616
+ color: #E5E5E5;
617
+ line-height: calc-em(27px, 13px);
618
+ text-shadow: rgba(0,0,0,1) 0 -1px 0;
619
+ border: none;
620
+
621
+ @include imprint;
622
+
623
+ } //on
624
+
625
+ } //tab, assets-reload
626
+
627
+ a.assets-reload {
628
+ margin-left: 0;
629
+ span {
630
+ display: block;
631
+ background: url('/assets/ample_assets/reload.png') no-repeat center center;
632
+ width: 16px;
633
+ height: 20px;
634
+ padding: 3px 0;
635
+ } //span
636
+ } //assets-reload
637
+
638
+ li {
639
+ display: block;
640
+ float: left;
641
+
642
+ &.file a {
643
+ display: block;
644
+ background: url('/assets/ample_assets/loading.gif') no-repeat center center;
645
+ width: calc-em(75px, $base-font-size);
646
+ height: calc-em(75px, $base-font-size);
647
+ border: $asset-border;
648
+ background: #111111;
649
+
650
+ @include border-radius($border-radius);
651
+ @include box-shadow(rgba(0,0,0,1) 0 2px 3px);
652
+ opacity: 1;
653
+
654
+ -webkit-transition: .3s linear border;
655
+ -moz-transition: .3s linear border;
656
+ transition: .3s linear border;
657
+
658
+ &:hover {
659
+ border: $asset-border-hover;
660
+ cursor: move;
661
+ }
662
+ img {
663
+ border: none;
664
+ }
665
+ } //file a
666
+
667
+ } //li
668
+
669
+ // ---- Uploadify Styling ------------------------------------ //
670
+
671
+ #upload {
672
+ padding: 0 calc-em(11px, $base-font-size);
673
+ p {
674
+ float: left;
675
+ width: calc-em(113px, $base-font-size);
676
+ }
677
+ .uploadifyQueue {
678
+ float: left;
679
+ width: calc-em(780px, $base-font-size);
680
+ max-height: calc-em(100px, $base-font-size);
681
+ @include clearfix;
682
+ overflow-y: scroll;
683
+
684
+ .uploadifyQueueItem {
685
+ float: left;
686
+ width: calc-em(350px, 11px);
687
+ margin: calc-em(10px, 11px) calc-em(10px, 11px) 0 0;
688
+ padding: calc-em(10px, 11px);
689
+
690
+ background: rgba(0,0,0,.2);
691
+ border: 1px solid #000;
692
+
693
+ @include border-radius($border-radius);
694
+
695
+ font-weight: bold;
696
+ font-size: calc-em(11px, $base-font-size);
697
+ text-shadow: rgba(0,0,0,1) 0 -1px 0, rgba(255,255,255,.1) 0 1px 0;
698
+ text-transform: uppercase;
699
+
700
+ .cancel {
701
+ float: right;
702
+ } //cancel icon
703
+
704
+ .fileName {
705
+ color: #FFF;
706
+ } //fileName
707
+
708
+ .percentage {
709
+ color: $text-highlight-color;
710
+ } //percentage
711
+
712
+
713
+ .uploadifyProgress,
714
+ .uploadifyError {
715
+
716
+ @include imprint;
717
+
718
+ border: 1px solid #000;
719
+ border-bottom: 1px solid rgba(255,255,255,.2);
720
+ width: 100%;
721
+ padding: calc-em(3px, 11px);
722
+ margin-top: calc-em(10px, 11px);
723
+
724
+ @include border-radius($border-radius);
725
+ @include box-shadow((inset rgba(0,0,0,1) 1px 2px 3px));
726
+
727
+ .uploadifyProgressBar {
728
+ height: calc-em(5px, 11px);
729
+ width: 1px;
730
+ background-color: #0099FF;
731
+
732
+ color: $text-highlight-color;
733
+
734
+ @include border-right-radius(12px);
735
+ } //progressBar
736
+
737
+ } //progressbarContainer
738
+
739
+ &.uploadifyError {
740
+ .percentage {
741
+ color: $text-error-color;
742
+ } //percentage
743
+ } //uploadifyError
744
+ } //uploadifyQueueItem
745
+
746
+ } //uploadifyQueue
747
+
748
+ } //upload
749
+
750
+ } //ample-assets