droom 0.2.1 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/app/assets/images/droom/Untitled-1.png +0 -0
  2. data/app/assets/images/droom/asterisk.png +0 -0
  3. data/app/assets/images/droom/dropbox_small.png +0 -0
  4. data/app/assets/images/droom/handle.png +0 -0
  5. data/app/assets/images/droom/minisymbols.png +0 -0
  6. data/app/assets/images/droom/revoke_small.png +0 -0
  7. data/app/assets/images/droom/toggle.png +0 -0
  8. data/app/assets/javascripts/droom.js.coffee +4 -4
  9. data/app/assets/javascripts/droom/actions.js.coffee +16 -5
  10. data/app/assets/javascripts/droom/lib/wysihtml5.js +18 -0
  11. data/app/assets/javascripts/droom/widgets.js.coffee +72 -111
  12. data/app/assets/stylesheets/droom.css.sass +195 -119
  13. data/app/assets/stylesheets/{_definitions.css.sass → droom/_mixins.css.sass} +28 -43
  14. data/app/assets/stylesheets/{lib → droom}/_popups.css.sass +0 -0
  15. data/app/assets/stylesheets/{lib → droom}/_toolbar.css.sass +2 -4
  16. data/app/assets/stylesheets/droom/_variables.css.sass +46 -0
  17. data/app/assets/stylesheets/lib/_kalendae.css.sass +2 -2
  18. data/app/controllers/droom/engine_controller.rb +5 -1
  19. data/app/controllers/droom/events_controller.rb +9 -6
  20. data/app/controllers/droom/groups_controller.rb +1 -1
  21. data/app/controllers/droom/organisations_controller.rb +1 -1
  22. data/app/controllers/droom/people_controller.rb +18 -18
  23. data/app/controllers/droom/suggestions_controller.rb +0 -1
  24. data/app/controllers/droom/user_confirmations_controller.rb +55 -0
  25. data/app/controllers/droom/users_controller.rb +1 -2
  26. data/app/controllers/droom/youtube_controller.rb +4 -1
  27. data/app/helpers/droom/droom_helper.rb +3 -3
  28. data/app/models/droom/document.rb +3 -27
  29. data/app/models/droom/event.rb +0 -12
  30. data/app/models/droom/folder.rb +9 -10
  31. data/app/models/droom/group.rb +0 -7
  32. data/app/models/droom/person.rb +13 -20
  33. data/app/models/droom/scrap.rb +2 -12
  34. data/app/models/droom/user.rb +29 -5
  35. data/app/models/droom/venue.rb +0 -17
  36. data/app/views/{droom/users/unwelcome.en.html.haml → devise/confirmations/failure.en.html.haml} +5 -2
  37. data/app/views/devise/confirmations/new.html.haml +25 -0
  38. data/app/views/devise/confirmations/show.html.haml +32 -0
  39. data/app/views/droom/dashboard/_documents.html.haml +9 -0
  40. data/app/views/droom/dashboard/_folders.html.haml +1 -1
  41. data/app/views/droom/dashboard/_groups.html.haml +9 -0
  42. data/app/views/droom/documents/_document.html.haml +1 -1
  43. data/app/views/droom/documents/_table_document.html.haml +1 -1
  44. data/app/views/droom/events/_event.html.haml +0 -1
  45. data/app/views/droom/events/edit.html.haml +1 -1
  46. data/app/views/droom/events/index.html.haml +6 -4
  47. data/app/views/droom/events/new.html.haml +1 -1
  48. data/app/views/droom/events/show.html.haml +1 -1
  49. data/app/views/droom/folders/_folder.html.haml +2 -2
  50. data/app/views/droom/folders/edit.html.haml +1 -1
  51. data/app/views/droom/folders/index.html.haml +3 -1
  52. data/app/views/droom/folders/new.html.haml +1 -1
  53. data/app/views/droom/groups/_group.html.haml +6 -3
  54. data/app/views/droom/groups/edit.html.haml +1 -1
  55. data/app/views/droom/groups/index.html.haml +20 -1
  56. data/app/views/droom/groups/new.html.haml +1 -1
  57. data/app/views/droom/organisations/_action_menu.html.haml +3 -1
  58. data/app/views/droom/organisations/_organisation.html.haml +0 -1
  59. data/app/views/droom/organisations/edit.html.haml +1 -1
  60. data/app/views/droom/organisations/new.html.haml +1 -1
  61. data/app/views/droom/panels/_dropbox.html.haml +1 -1
  62. data/app/views/droom/panels/{_search.html.haml → _suggestions.html.haml} +3 -4
  63. data/app/views/droom/people/_form.html.haml +15 -19
  64. data/app/views/droom/people/_listing.html.haml +1 -1
  65. data/app/views/droom/people/_person.html.haml +3 -3
  66. data/app/views/droom/people/_suggested.html.haml +1 -1
  67. data/app/views/droom/people/edit.html.haml +1 -1
  68. data/app/views/droom/people/new.html.haml +1 -1
  69. data/app/views/droom/people/show.html.haml +31 -1
  70. data/app/views/droom/scraps/full/_document.html.haml +1 -1
  71. data/app/views/droom/scraps/thumbs/_document.html.haml +2 -2
  72. data/app/views/droom/shared/{_search_form.html.haml → _suggestion_form.html.haml} +1 -1
  73. data/app/views/droom/users/_extra_columns.html.haml +0 -0
  74. data/app/views/droom/users/_extra_columns_header.html.haml +0 -0
  75. data/app/views/droom/users/_extra_columns_note.html.haml +0 -0
  76. data/app/views/droom/users/_form.html.haml +5 -12
  77. data/app/views/droom/users/_user_or_person.html.haml +24 -15
  78. data/app/views/droom/users/_users_table.html.haml +24 -6
  79. data/app/views/droom/users/edit.html.haml +1 -1
  80. data/app/views/droom/users/index.html.haml +2 -5
  81. data/config/locales/devise.en.yml +1 -1
  82. data/config/locales/en.yml +22 -7
  83. data/config/routes.rb +4 -3
  84. data/lib/droom.rb +28 -14
  85. data/lib/droom/engine.rb +2 -0
  86. data/lib/droom/version.rb +1 -1
  87. data/spec/dummy/log/dav.log +1 -0
  88. data/spec/dummy/log/development.log +2 -0
  89. data/spec/dummy/log/test.log +1 -0
  90. metadata +29 -33
  91. data/app/controllers/droom/confirmations_controller.rb +0 -38
  92. data/app/controllers/droom/search_controller.rb +0 -66
  93. data/app/views/cropper/uploads/_crop.html.haml +0 -46
  94. data/app/views/devise/mailer/confirmation_instructions.en.html.haml +0 -24
  95. data/app/views/devise/mailer/reset_password_instructions.en.html.haml +0 -21
  96. data/app/views/droom/shared/_search_results.html.haml +0 -9
  97. data/app/views/droom/shared/search.html.haml +0 -18
@@ -8,7 +8,6 @@
8
8
  #= require droom/lib/kalendae
9
9
  #= require droom/lib/wysihtml5
10
10
  #= require droom/lib/parser_rules/advanced
11
- #= require cropper
12
11
  #= require droom/extensions
13
12
  #= require droom/utilities
14
13
  #= require droom/ajax
@@ -17,6 +16,7 @@
17
16
  #= require droom/widgets
18
17
  #= require droom/stream
19
18
  #= require droom/map
19
+ #= require cropper
20
20
  #= require_self
21
21
 
22
22
  jQuery ($) ->
@@ -32,8 +32,6 @@ jQuery ($) ->
32
32
 
33
33
  @find_including_self('[data-action="popup"]').popup()
34
34
  @find_including_self('[data-action="close"]').closes()
35
- @find_including_self('[data-action="upload"]').uploader()
36
- @find_including_self('[data-action="recrop"]').recropper()
37
35
  @find_including_self('[data-action="affect"]').affects()
38
36
  @find_including_self('[data-action="reveal"]').reveals()
39
37
  @find_including_self('[data-action="remove"]').removes()
@@ -48,6 +46,7 @@ jQuery ($) ->
48
46
  @find_including_self('[data-action="fit"]').self_sizes()
49
47
  @find_including_self('form[data-action="filter"]').filter_form()
50
48
  @find_including_self('[data-menu]').action_menu()
49
+ @find_including_self('td[data-hoverable]').hover_column()
51
50
 
52
51
  # it's not very easy to add data attributes to kaminari pagination links
53
52
 
@@ -68,7 +67,8 @@ jQuery ($) ->
68
67
  @find_including_self('.person_picker').person_picker()
69
68
  @find_including_self('.group_picker').group_picker()
70
69
  @find_including_self('.drag_sort').drag_sort()
71
- @find_including_self('input.password').password_field()
70
+ # @find_including_self('input.password').password_field()
71
+ @find_including_self('form.password').password_form()
72
72
  @find_including_self('input[type="submit"]').submitter()
73
73
  @find_including_self('form.preferences').preferences_form()
74
74
  @find_including_self('form.scrap').scrap_form()
@@ -141,11 +141,12 @@ jQuery ($) ->
141
141
  class Toggle
142
142
  constructor: (element, @_selector, @_name) ->
143
143
  @_container = $(element)
144
+ @_remembered = @_container.attr('data-remembered') != 'false'
144
145
  @_name ?= "droom_#{@_selector}_state"
145
146
  @_showing_text = @_container.text().replace('show', 'hide').replace('Show', 'Hide').replace('more', 'less').replace('More', 'Less')
146
147
  @_hiding_text = @_showing_text.replace('hide', 'show').replace('Hide', 'Show').replace('less', 'more').replace('Less', 'More')
147
148
  @_container.click @toggle
148
- if cookie = $.cookie(@_name)
149
+ if @_remembered and cookie = $.cookie(@_name)
149
150
  @_showing = cookie is "showing"
150
151
  @apply()
151
152
  else
@@ -164,6 +165,7 @@ jQuery ($) ->
164
165
  @_container.addClass('showing')
165
166
  $(@_selector).slideDown () =>
166
167
  @show()
168
+ @_container.trigger('toggled')
167
169
 
168
170
  show: =>
169
171
  $(@_selector).show()
@@ -175,6 +177,7 @@ jQuery ($) ->
175
177
  slideUp: =>
176
178
  $(@_selector).slideUp () =>
177
179
  @hide()
180
+ @_container.trigger('toggled')
178
181
 
179
182
  hide: =>
180
183
  $(@_selector).hide()
@@ -184,9 +187,10 @@ jQuery ($) ->
184
187
  @store()
185
188
 
186
189
  store: () =>
187
- value = if @_showing then "showing" else "hidden"
188
- $.cookie @_name, value,
189
- path: '/'
190
+ if @_remembered
191
+ value = if @_showing then "showing" else "hidden"
192
+ $.cookie @_name, value,
193
+ path: '/'
190
194
 
191
195
 
192
196
  # The collapser is a self-expanding unit. Basically a toggle. #todo: amalgamate!
@@ -200,7 +204,7 @@ jQuery ($) ->
200
204
  constructor: (element, opts) ->
201
205
  @container = $(element)
202
206
  @options = $.extend {
203
- toggle: ".heading a.name"
207
+ toggle: "a.name"
204
208
  body: ".detail"
205
209
  preview: ".preview"
206
210
  }, opts
@@ -337,6 +341,13 @@ jQuery ($) ->
337
341
 
338
342
 
339
343
 
344
+ $.fn.hover_column = ->
345
+ @each ->
346
+ classes = @className.split(' ').join('.')
347
+ $(@).bind "mouseenter", (e) ->
348
+ $("td.#{classes}").addClass('hover')
349
+ $(@).bind "mouseleave", (e) ->
350
+ $("td.#{classes}").removeClass('hover')
340
351
 
341
352
 
342
353
 
@@ -5057,7 +5057,13 @@ wysihtml5.dom.parse = (function() {
5057
5057
  var attributeCheckMethods = {
5058
5058
  url: (function() {
5059
5059
  var REG_EXP = /^https?:\/\//i;
5060
+ var MUSTACHE_REG_EXP = /^(\{\{\w+\}\}$)/i;
5060
5061
  return function(attributeValue) {
5062
+ if (attributeValue.match(MUSTACHE_REG_EXP)) {
5063
+ return attributeValue.replace(MUSTACHE_REG_EXP, function(match) {
5064
+ return match.toLowerCase();
5065
+ });
5066
+ }
5061
5067
  if (!attributeValue || !attributeValue.match(REG_EXP)) {
5062
5068
  return null;
5063
5069
  }
@@ -5069,7 +5075,13 @@ wysihtml5.dom.parse = (function() {
5069
5075
 
5070
5076
  src: (function() {
5071
5077
  var REG_EXP = /^(\/|https?:\/\/)/i;
5078
+ var MUSTACHE_REG_EXP = /^(\{\{\w+\}\}$)/i;
5072
5079
  return function(attributeValue) {
5080
+ if (attributeValue.match(MUSTACHE_REG_EXP)) {
5081
+ return attributeValue.replace(MUSTACHE_REG_EXP, function(match) {
5082
+ return match.toLowerCase();
5083
+ });
5084
+ }
5073
5085
  if (!attributeValue || !attributeValue.match(REG_EXP)) {
5074
5086
  return null;
5075
5087
  }
@@ -5081,7 +5093,13 @@ wysihtml5.dom.parse = (function() {
5081
5093
 
5082
5094
  href: (function() {
5083
5095
  var REG_EXP = /^(\/|https?:\/\/|mailto:)/i;
5096
+ var MUSTACHE_REG_EXP = /^(\{\{\w+\}\}$)/i;
5084
5097
  return function(attributeValue) {
5098
+ if (attributeValue.match(MUSTACHE_REG_EXP)) {
5099
+ return attributeValue.replace(MUSTACHE_REG_EXP, function(match) {
5100
+ return match.toLowerCase();
5101
+ });
5102
+ }
5085
5103
  if (!attributeValue || !attributeValue.match(REG_EXP)) {
5086
5104
  return null;
5087
5105
  }
@@ -217,81 +217,56 @@ jQuery ($) ->
217
217
  @_field.val(i)
218
218
 
219
219
 
220
- $.fn.password_field = ->
220
+ $.fn.password_form = ->
221
221
  @each ->
222
- new PasswordField(@)
222
+ new PasswordForm(@)
223
223
 
224
- class PasswordField
224
+ class PasswordForm
225
225
  constructor: (element, opts) ->
226
226
  @options = $.extend
227
227
  length: 6
228
228
  , opts
229
- @field = $(element)
230
- @_notice = $('.password_notice')
231
- @form = @field.parents('form')
229
+ @form = $(element)
230
+ @password_field = @form.find('input.password')
231
+ @confirmation_field = @form.find('input.password_confirmation')
232
+ @fields = @form.find('input')
233
+ @confirmation_holder = @confirmation_field.parents("p")
232
234
  @submit = @form.find('.submit')
233
- @confirmation = $("#" + @field.attr("id") + "_confirmation")
234
- @confirmation_holder = @confirmation.parents("p")
235
- @mock_password = 'password'
236
- @required = @field.attr('required')
237
- @field.focus @wake
238
- @field.blur @sleep
239
- @field.keyup @check
240
- @confirmation.keyup @check
241
- @form.submit @stumbit
242
- # to set up initial state
243
- @check()
244
- @sleep()
245
-
246
- wake: () =>
247
- if @field.val() is @mock_password
248
- @field.removeClass "empty"
249
- @field.val ""
250
-
251
- sleep: () =>
252
- v = @field.val()
253
- if v is @mock_password or v is ""
254
- @field.val @mock_password
255
- @field.addClass("empty")
256
- # if we're not required, then both-empty is also a submittable condition
257
- if @confirmation.val() is "" and not @required
258
- @submittable()
259
-
260
- check: () =>
261
- if @empty() and !@required
262
- @field.removeClass("ok notok").addClass("empty")
263
- @confirmation_holder.hide()
264
- @submittable()
265
- @notify ""
266
- else if @valid()
267
- @field.addClass("ok").removeClass "notok"
268
- @confirmation_holder.show()
269
- @notify "You must confirm your password before you can proceed."
270
- if @matching()
271
- @notify "Passwords match.", "successful"
272
- @confirmation.addClass("ok").removeClass("notok")
273
- @submittable()
274
- else
275
- if @confirmation_empty()
276
- @notify "Please confirm your password."
277
- else
278
- @notify "The confirmation does not match your password.", "erratic"
279
- @confirmation.addClass("notok").removeClass("ok")
280
- @unsubmittable()
235
+ @required = @password_field.attr('required')
236
+
237
+ @fields.bind 'keyup', @checkForm
238
+ @password_field.bind 'keyup', @checkPassword
239
+ @fields.bind 'invalid', @invalidField
240
+ @form.bind 'submit', @submitIfValid
241
+
242
+ @fields.attr('data-strict', false)
243
+ @unsubmittable()
244
+ @confirmation_holder.hide()
245
+
246
+ checkForm: () =>
247
+ @fields.removeClass('invalid').addClass('valid')
248
+ if @form.get(0).checkValidity() then @submittable() else @unsubmittable()
249
+
250
+ invalidField: () ->
251
+ # note thin arrow: `this` is the failing input element
252
+ field = $(@)
253
+ field.removeClass('valid')
254
+ if !field.attr('data-strict') and !field.val() or field.val() is ""
255
+ field.addClass('empty')
281
256
  else
257
+ field.addClass("invalid")
258
+
259
+ checkPassword: () =>
260
+ if @password_field.val() == "" and !@required
261
+ @confirmation_field.attr('pattern', '').attr('required', false)
282
262
  @confirmation_holder.hide()
283
- @confirmation.val ""
284
- @unsubmittable()
285
- @field.addClass("notok").removeClass("ok")
286
- @confirmation.addClass("notok").removeClass("ok")
287
- if @empty()
288
- @notify "Please enter a password."
263
+ else
264
+ @confirmation_field.attr('pattern', @password_field.val()).attr('required', true)
265
+ if @password_field.get(0).checkValidity()
266
+ @confirmation_holder.show()
289
267
  else
290
- @notify "Your password should have least six letters.", "erratic"
291
-
292
- notify: (message, cssclass) =>
293
- @_notice.removeClass('erratic successful').addClass(cssclass).text(message)
294
-
268
+ @confirmation_holder.hide()
269
+
295
270
  submittable: () =>
296
271
  @submit.removeClass("unavailable")
297
272
  @blocked = false
@@ -300,25 +275,15 @@ jQuery ($) ->
300
275
  @submit.addClass("unavailable")
301
276
  @blocked = true
302
277
 
303
- empty: () =>
304
- !@field.val() || @field.val().length == 0
305
-
306
- confirmation_empty: () =>
307
- !@confirmation.val() || @confirmation.val().length == 0
308
-
309
- valid: () =>
310
- v = @field.val()
311
- v.length >= @options.length and (!@options.validator? or @options.validator.test(v))
312
-
313
- matching: () =>
314
- @confirmation.val() is @field.val()
315
-
316
- stumbit: (e) =>
278
+ submitIfValid: (e) =>
279
+ @fields.attr('data-strict', true)
280
+ @checkForm()
317
281
  if @blocked
318
282
  e.preventDefault()
319
283
  else
320
- @field.val("") if @field.val() is @mock_password
321
-
284
+ # might as well debounce, since we're here
285
+ @submit.val('please wait')
286
+ @unsubmittable()
322
287
 
323
288
 
324
289
  # A captive form submits via an ajax request and pushes its results into the present page in the place
@@ -926,11 +891,11 @@ jQuery ($) ->
926
891
  afterSelect: null
927
892
  , options)
928
893
  if options.type
929
- @url = "/suggestions/#{options.type}.json"
894
+ @options.url ?= "/suggestions/#{options.type}.json"
930
895
  else
931
- @url = "/suggestions.json"
932
- if options.preload
933
- @url += "?empty=all"
896
+ @options.url ?= "/suggestions.json"
897
+ if @options.preload
898
+ @options.url += "?empty=all"
934
899
  @dropdown = new Dropdown @prompt,
935
900
  on_select: @select
936
901
  on_keyup: @get
@@ -961,7 +926,7 @@ jQuery ($) ->
961
926
  @suggest []
962
927
  else
963
928
  @request.abort() if @request
964
- @request = $.getJSON(@url, "term=" + encodeURIComponent(query) + "&limit=" + @options.limit, (suggestions) =>
929
+ @request = $.getJSON(@options.url, "term=" + encodeURIComponent(query) + "&limit=" + @options.limit, (suggestions) =>
965
930
  @cache[query] = suggestions
966
931
  @blanks.push query if suggestions.length is 0
967
932
  @suggest suggestions
@@ -980,7 +945,7 @@ jQuery ($) ->
980
945
  @dropdown.show(suggestions)
981
946
  @options.afterSuggest.call(@, suggestions) if @options.afterSuggest
982
947
 
983
- select: (value) =>
948
+ select: (value, id) =>
984
949
  if @options.fill_field?
985
950
  @prompt.val(value)
986
951
  @prompt.trigger('suggester.change')
@@ -1024,35 +989,31 @@ jQuery ($) ->
1024
989
  constructor: () ->
1025
990
  super
1026
991
  @target = $('textarea#scrap_body')
992
+ @caption = $('textarea#scrap_note')
1027
993
  @thumb = $('.scrapvideo .thumb')
1028
994
 
1029
995
  suggest: (suggestions) =>
1030
- @button.removeClass "waiting"
1031
- @prompt.removeClass "waiting"
996
+ @unwait()
1032
997
  if suggestions.length > 0
1033
- $.each suggestions, (i, suggestion) =>
1034
- link = $("<a href=\"/videos/#{suggestion.unique_id}.js\"><img src='#{suggestion.thumbnails[2].url}' /><span class=\"title\">#{suggestion.title.truncate(36)}</span><br /><span class=\"description\">#{suggestion.description.truncate(48)}</span></a>")
1035
- value = suggestion.value || suggestion.prompt
1036
- link.remote
1037
- on_success: (response) =>
1038
- @select(response, suggestion)
1039
- link.hover () =>
1040
- @hover(link)
1041
- $("<li></li>").addClass("video").append(link).appendTo(@container)
1042
- @suggestions = @container.find("a")
1043
- @show()
998
+ detailed_suggestions = $.map suggestions, (suggestion, i) ->
999
+ {type: "video", id: suggestion.unique_id, value: "<img src='#{suggestion.thumbnails[0].url}' /><span class=\"title\">#{suggestion.title?.truncate(36)}</span><br /><span class=\"description\">#{suggestion.description?.truncate(48)}</span>"}
1000
+ @dropdown.show(detailed_suggestions)
1044
1001
  else
1045
1002
  @hide()
1046
- @options.afterSuggest.call @, suggestions if @options.afterSuggest
1003
+ @options.afterSuggest.call @, suggestions if @options.afterSuggest
1047
1004
 
1048
- select: (response, selection) =>
1005
+ select: (value, id) =>
1049
1006
  @hide()
1050
1007
  @prompt.trigger 'suggester.change'
1051
- @target.val selection.unique_id
1052
- @thumb.empty().html(response)
1008
+ @target.val(id)
1009
+ title = $("<div>#{value}</div>").find('.title')
1010
+ @caption.val(title.text()) if @caption.val() is ""
1011
+ $.get "/videos/#{id}.js", @preview, 'html'
1053
1012
  @options.afterSelect?.call(@, value)
1054
-
1055
-
1013
+
1014
+ preview: (html) =>
1015
+ @thumb.empty().html(html)
1016
+
1056
1017
 
1057
1018
  # I've just lifted this out of the suggester so that it can be used in other pickers.
1058
1019
 
@@ -1079,8 +1040,8 @@ jQuery ($) ->
1079
1040
  @reset()
1080
1041
  if items.length > 0
1081
1042
  $.each items, (i, item) =>
1082
- id = item.id || item.value
1083
- value = item.value || item.prompt || item.id
1043
+ id = item.id ? item.value ? item.unique_id
1044
+ value = item.title ? item.value ? item.prompt ? item.id
1084
1045
  link = $("<a href=\"#\">#{value}</a>")
1085
1046
  link.hover () =>
1086
1047
  @hover(link)
@@ -1088,7 +1049,7 @@ jQuery ($) ->
1088
1049
  e.preventDefault()
1089
1050
  e.stopPropagation()
1090
1051
  @item = i
1091
- @select(value)
1052
+ @select(value, id)
1092
1053
  $("<li></li>").addClass(item.type).append(link).appendTo(@drop)
1093
1054
  @items = @drop.find("a")
1094
1055
 
@@ -1101,9 +1062,9 @@ jQuery ($) ->
1101
1062
  e.stopPropagation()
1102
1063
  @select $(highlit).text()
1103
1064
 
1104
- select: (value) =>
1065
+ select: (value, id) =>
1105
1066
  @hide()
1106
- @options.on_select?(value)
1067
+ @options.on_select?(value, id)
1107
1068
 
1108
1069
  cancel: (e) =>
1109
1070
  @hide()
@@ -1,24 +1,48 @@
1
- //= depend_on _definitions.css.sass
2
- //= depend_on lib/_popups.css.sass
3
- //= depend_on lib/_kalendae.css.sass
4
- //= depend_on lib/_toolbar.css.sass
1
+ @import compass/css3
2
+ @import droom/variables
3
+
4
+ $dark: #4d4e53 !default
5
+ $mid: #9a9b9d !default
6
+ $pale: #bdbdbd !default
7
+ $verypale: #d6d6d4 !default
8
+ $palest: #f2f0ed !default
9
+
10
+ $blue: #00afdb
11
+ $green: #74b87a
12
+ $warmred: #ff625b
13
+ $darkred: #b92a23
14
+ $purple: #a27ec3
15
+ $red: #ed1c24
16
+ $palered: lighten($red, 30)
17
+
18
+ $page: #ffffff !default
19
+ $text: $green !default
20
+ $link: #8f9cb8 !default
21
+ $hover: #bec7d8 !default
22
+ $active: #8c8d8e !default
23
+ $submit: $green !default
24
+ $error: #b92a23 !default
25
+ $help: #e59811 !default
26
+ $visited: $link !default
27
+ $input: $blue !default
28
+ $admin: $blue
5
29
 
6
30
  $datemark_width: 50px
7
31
  $datemark_margin: 5px
8
32
  $tool_button_height: 32px
9
33
  $tool_button_width: 32px
10
34
 
11
- @import compass/css3
12
- @import definitions
13
- @import lib/toolbar
35
+ @import droom/mixins
36
+ @import droom/toolbar
14
37
  @import lib/kalendae
15
- @import lib/popups
38
+ @import droom/popups
39
+
16
40
 
17
41
  p.large
18
42
  font-size: 1.6em
19
43
 
20
44
  a.dropbox
21
- +icon_link("droom/dropbox.png")
45
+ +big_icon_link("droom/dropbox.png")
22
46
  color: #4ea1ea
23
47
  &:visited
24
48
  color: #4ea1ea
@@ -29,25 +53,21 @@ a.dropbox
29
53
  color: $hover
30
54
 
31
55
  a.dropboxer
32
- +icon_link("droom/dropbox_button_small.png")
33
- margin-left: 10px
56
+ +icon_link("droom/dropbox_small.png")
57
+ margin-left: 0
34
58
  color: #4ea1ea
35
59
  &:visited
36
60
  color: #4ea1ea
37
61
  &:hover
38
62
  color: $hover
39
- &.revoke
40
- background-position: 0 -48px
41
- color: $hover
42
-
43
63
 
44
64
  input.dropbox.revoke[type="submit"]
45
- +icon_link("droom/revoke.png")
65
+ +icon_link("droom/revoke_small.png")
46
66
  background-color: none
47
67
  color: $blue
48
68
  padding: 0
49
69
  height: auto
50
- line-height: 1
70
+ line-height: 20px
51
71
  &:hover
52
72
  color: $hover
53
73
 
@@ -58,10 +78,21 @@ a.cancel, a.cancel:visited
58
78
  a.external
59
79
  color: $mid
60
80
 
81
+ a.toggle
82
+ +icon_link("droom/toggle.png")
83
+ color: $blue
84
+ &.showing
85
+ background-position: 0 -64px
86
+ &:hover
87
+ background-position: 0 -96px
88
+
61
89
  .unavailable
62
90
  +small
63
91
  +pale
64
92
 
93
+ .suffix
94
+ clear: both
95
+
65
96
  a.autofetch
66
97
  display: inline-block
67
98
  &.waiting
@@ -118,10 +149,6 @@ p.stretcher
118
149
  a, a:visited
119
150
  color: $dark
120
151
 
121
- a.changed
122
- color: $green
123
- +hover
124
-
125
152
 
126
153
  h2.section
127
154
  font-size: 1.25em
@@ -359,14 +386,14 @@ form.person
359
386
  .img
360
387
  width: 130px
361
388
  height: 130px
362
- .prompt
363
- padding-top: 30px
364
- +small
365
- .scaler
366
- width: 100px
367
- p.range
368
- .slider
369
- width: 70px
389
+ .prompt
390
+ padding-top: 30px
391
+ +small
392
+ .scaler
393
+ width: 100px
394
+ p.range
395
+ .slider
396
+ width: 70px
370
397
  p.name
371
398
  margin: 0
372
399
  input
@@ -431,9 +458,6 @@ h2.name
431
458
  font-size: 2em
432
459
  margin: 0
433
460
 
434
- p.description.changed
435
- color: $green
436
-
437
461
  a.dl, a.ul
438
462
  display: inline-block
439
463
  min-height: 50px
@@ -455,7 +479,6 @@ a.dl, a.ul
455
479
  height: 50px
456
480
  overflow: hidden
457
481
 
458
-
459
482
  span.icon
460
483
  display: block
461
484
  float: left
@@ -629,28 +652,57 @@ table.people
629
652
 
630
653
  table.users
631
654
  margin-top: 40px
655
+ border-collapse: collapse
632
656
  thead
633
- th.admin, th.invited, th.confirmed, th.directory, th.group, th.settings
657
+ th
634
658
  max-width: 24px
635
659
  height: 50px
636
660
  padding-top: 36px
637
661
  padding-left: 6px
638
- line-height: 1
639
- +rotate(-75deg)
662
+ span.rotated
663
+ display: block
664
+ line-height: 1
665
+ white-space: nowrap
666
+ +rotate(-75deg)
667
+ th.spacer
668
+ padding: 10px
669
+ th.note
670
+ font-weight: normal
671
+ height: 20px
672
+ color: $pale
673
+ font-size: 85%
674
+ padding: 5px
675
+ border-bottom: 1px solid $pale
676
+ text-align: center
677
+ &.spacer
678
+ border: none
640
679
  tbody
680
+ td
681
+ padding-top: 15px
682
+ td.hover
683
+ background-color: $palest
684
+ tr:hover
685
+ td
686
+ background-color: $palest
687
+ border-color: $palest
688
+ td[data-hoverable]:hover
689
+ background-color: $pale
641
690
  td.name
642
691
  min-width: 140px
643
692
  min-height: 36px
644
693
  line-height: 1
694
+ text-align: left
645
695
  td.email
646
696
  +small
647
697
  +pale
648
698
  line-height: 1.8em
649
- td.admin, td.invited, td.confirmed, td.directory, td.group
650
- padding-right: 2px
651
- width: 36px
699
+ text-align: left
700
+ td.spacer
701
+ padding: 10px
702
+ td
703
+ width: 30px
652
704
  text-align: center
653
- span, a
705
+ span, a.yes, a.no
654
706
  +icon("droom/minisymbols.png")
655
707
  &.yes
656
708
  background-position: 0 -384px
@@ -661,17 +713,14 @@ table.users
661
713
  &.waiting
662
714
  background-image: image-url('droom/spinner.gif')
663
715
  background-position: 2px 2px
664
- span.no
665
- background-position: 0 -504px
716
+ span.no, span.yes
717
+ +opacity(0.3)
666
718
  a.no
667
719
  &:hover
668
- background-position: 0 -576px
669
- td.settings
670
- padding-right: 2px
671
- width: 24px
672
- overflow: hidden
673
- a
674
- +icon("droom/edit.png")
720
+ background-position: 0 -648px
721
+ a.yes
722
+ &:hover
723
+ background-position: 0 -480px
675
724
 
676
725
 
677
726
 
@@ -705,23 +754,6 @@ table.groups
705
754
  p
706
755
  margin-top: 0
707
756
 
708
- p.twister
709
- &:first-child
710
- margin-top: 0
711
- a
712
- display: block
713
- padding-left: 18px
714
- background:
715
- repeat: no-repeat
716
- position: 0 -62px
717
- image: image-url('droom/twister.png')
718
- &:hover
719
- background-position: 0 -94px
720
- &.closed
721
- a
722
- background-position: 0 2px
723
- &:hover
724
- background-position: 0 -30px
725
757
 
726
758
 
727
759
 
@@ -801,7 +833,7 @@ div.menu
801
833
  z-index: 50
802
834
  display: none
803
835
  +box-shadow(0 4px 6px $dark)
804
- background-color: $blue
836
+ background-color: $admin
805
837
  ul.actions
806
838
  padding: 0
807
839
  margin: 8px 10px 3px 5px
@@ -903,7 +935,11 @@ div.copyholder
903
935
  position: relative
904
936
  a.copy
905
937
  display: block
906
- min-width: 40px
938
+ color: $mid
939
+ font-weight: normal
940
+ font-size: 16px
941
+ white-space: nowrap
942
+ +icon_link("droom/smallcopy.png")
907
943
  min-height: 15px
908
944
  embed
909
945
  position: absolute
@@ -963,7 +999,7 @@ ul.dropdown
963
999
  margin-top: 2px
964
1000
  span.description
965
1001
  white-space: nowrap
966
- color: $pale
1002
+ color: $mid
967
1003
  font-size: 0.8em
968
1004
  a
969
1005
  padding: 8px 6px 6px 6px
@@ -1066,45 +1102,24 @@ input[type="text"], input[type="password"], input[type="email"], select, textare
1066
1102
  background-color: #fff
1067
1103
  border-color: $verypale
1068
1104
 
1069
- input[type="submit"], a.submit, a.submit:visited
1105
+ input[type="submit"]
1106
+ +button($green)
1070
1107
  display: inline-block
1071
- background:
1072
- color: $submit
1073
- image: image-url('droom/small_go.png')
1074
- repeat: no-repeat
1075
- position: 8px 14px
1076
- padding: 5px 12px 5px 24px
1077
- text-align: left
1078
- color: white
1079
- // height: 39px
1080
- border: none
1081
- font-size: 1em
1082
- line-height: 2
1083
- +border-radius(3px)
1084
- &:hover
1085
- background-color: $hover
1086
- color: white
1087
1108
  &.unavailable
1088
1109
  background-color: $mid
1089
1110
  +opacity(0.5)
1090
1111
  &:hover
1091
1112
  background-color: $mid
1092
1113
  &.waiting
1093
- background:
1094
- color: $pale
1095
- image: image-url('droom/smallspinner.gif')
1096
- position: 5px 11px
1114
+ background-color: $pale
1097
1115
  &:hover
1098
1116
  background-color: $pale
1099
1117
 
1100
-
1101
1118
  #account
1102
1119
  position: relative
1103
1120
  clear: both
1104
1121
  width: 600px
1105
1122
  label
1106
- font-weight: bold
1107
- color: $dark
1108
1123
  font-size: 1.1em
1109
1124
  &.minor
1110
1125
  font-size: 0.9em
@@ -1186,13 +1201,13 @@ div.timepicker
1186
1201
  cursor: pointer
1187
1202
  padding: 4px 3px
1188
1203
  &.selected
1189
- background: $rubine
1204
+ background: $link
1190
1205
  color: #fff
1191
1206
  font-weight: bold
1192
1207
  &:hover
1193
1208
  background: $verypale
1194
1209
  &:active
1195
- background: $rubine
1210
+ background: $link
1196
1211
  color: #fff
1197
1212
 
1198
1213
  #minicalendar
@@ -1370,6 +1385,24 @@ ul.tags
1370
1385
  display: inline-block
1371
1386
 
1372
1387
 
1388
+ p.twister
1389
+ &:first-child
1390
+ margin-top: 0
1391
+ a
1392
+ display: block
1393
+ padding-left: 18px
1394
+ background:
1395
+ repeat: no-repeat
1396
+ position: 0 -62px
1397
+ image: image-url('droom/twister.png')
1398
+ &:hover
1399
+ background-position: 0 -94px
1400
+ &.closed
1401
+ a
1402
+ background-position: 0 2px
1403
+ &:hover
1404
+ background-position: 0 -30px
1405
+
1373
1406
  .twisted
1374
1407
  display: none
1375
1408
 
@@ -1419,7 +1452,20 @@ a.expander
1419
1452
  ul.filing
1420
1453
  padding: 0
1421
1454
  list-style: none
1422
-
1455
+
1456
+ ul.folder
1457
+ position: relative
1458
+ float: right
1459
+ width: 240px
1460
+ padding-left: 20px
1461
+ margin-bottom: 10px
1462
+ margin-top: 0
1463
+ list-style: none
1464
+ li.folder
1465
+ a.folder
1466
+ font-weight: bold
1467
+ color: $text
1468
+
1423
1469
  ul#folders, div.attachments
1424
1470
  padding-left: 0
1425
1471
  li
@@ -1460,7 +1506,7 @@ input.search_box
1460
1506
  #flashes
1461
1507
  position: absolute
1462
1508
  top: 20px
1463
- left: 50px
1509
+ right: 50px
1464
1510
  width: 300px
1465
1511
  p
1466
1512
  display: none
@@ -1472,8 +1518,8 @@ input.search_box
1472
1518
  background-color: $green
1473
1519
  border-color: darken($green, 10%)
1474
1520
  &.alert
1475
- background-color: $rubine
1476
- border-color: darken($rubine, 10%)
1521
+ background-color: $link
1522
+ border-color: darken($link, 10%)
1477
1523
  a.closer
1478
1524
  display: block
1479
1525
  float: right
@@ -1510,7 +1556,7 @@ nav.icons
1510
1556
  +panel_icon("droom/integration_buttons.png", -192px, 0)
1511
1557
  a.keywords
1512
1558
  +panel_icon("droom/integration_buttons.png", -224px, 0)
1513
- a.search
1559
+ a.suggestions
1514
1560
  +panel_icon("droom/integration_buttons.png", -256px, 0)
1515
1561
  a.devices
1516
1562
  +panel_icon("droom/integration_buttons.png", -288px, 0)
@@ -1616,7 +1662,6 @@ ul.documents
1616
1662
  margin: 20px 0 32px -2px
1617
1663
  padding: 0
1618
1664
  list-style: none
1619
-
1620
1665
 
1621
1666
  ul.people
1622
1667
  margin: 20px 0 32px -2px
@@ -1624,7 +1669,7 @@ ul.people
1624
1669
  list-style: none
1625
1670
  li.person
1626
1671
  display: inline-block
1627
- width: 280px
1672
+ width: 190px
1628
1673
  height: 48px
1629
1674
  line-height: 1.1
1630
1675
  margin-bottom: 10px
@@ -1637,7 +1682,7 @@ ul.people
1637
1682
  width: 32px
1638
1683
  height: 32px
1639
1684
  margin-right: 9px
1640
- border: 4px solid white
1685
+ border: 2px solid white
1641
1686
  +box-shadow(1px 2px 5px $mid)
1642
1687
  background:
1643
1688
  color: $mid
@@ -1669,7 +1714,7 @@ ul.people
1669
1714
  overflow: hidden
1670
1715
  padding-top: 4px
1671
1716
  span.name
1672
- font-size: 1.2em
1717
+ font-size: 1em
1673
1718
 
1674
1719
  .search_results
1675
1720
  position: relative
@@ -1844,12 +1889,37 @@ div.popup
1844
1889
  background-color: white
1845
1890
  padding: 20px 140px
1846
1891
 
1892
+ div.person
1893
+ margin: 20px 20px
1894
+ div.mugshot
1895
+ position: relative
1896
+ display: block
1897
+ float: left
1898
+ width: 130px
1899
+ height: 130px
1900
+ margin-right: 20px
1901
+ margin-bottom: 10px
1902
+ border: 2px solid white
1903
+ +box-shadow(1px 2px 5px $mid)
1904
+ background:
1905
+ color: $mid
1906
+ repeat: no-repeat
1907
+ position: center center
1908
+ size: cover
1909
+ div.detail
1910
+ overflow: hidden
1911
+ h3
1912
+ margin: 0
1913
+ font-size: 2em
1914
+ p.contact
1915
+ +pale
1916
+ margin-top: 0
1917
+
1847
1918
  div.body
1848
1919
  position: relative
1849
1920
  margin-top: 0
1850
1921
  overflow: hidden
1851
1922
  height: 326px
1852
- background-color: white
1853
1923
  p
1854
1924
  margin: 20px 20px
1855
1925
  font-size: 1.5em
@@ -1888,6 +1958,7 @@ div.popup
1888
1958
  float: left
1889
1959
  margin: 0
1890
1960
  width: 170px
1961
+
1891
1962
  .icon
1892
1963
  width: 60px
1893
1964
  height: 60px
@@ -1899,7 +1970,7 @@ div.popup
1899
1970
 
1900
1971
  div.scrapevent, div.scrapdocument
1901
1972
  position: relative
1902
- margin: 0 40px 0 60px
1973
+ margin: 0
1903
1974
  overflow: auto
1904
1975
  padding-top: 126px
1905
1976
  background-color: white
@@ -2072,23 +2143,28 @@ div.popup
2072
2143
  position: absolute
2073
2144
  top: 1000px
2074
2145
  left: 0
2146
+ .prompt
2147
+ text-align: center
2148
+ padding: 20px
2149
+ line-height: 1.25
2150
+ a
2151
+ color: white
2152
+ +glow_on_hover
2153
+ .note
2154
+ color: $pale
2155
+ margin-top: 2px
2075
2156
  .img
2157
+ position: absolute
2158
+ top: 0
2159
+ left: 0
2160
+ &:empty
2161
+ display: none
2162
+ &.hover
2163
+ .img
2076
2164
  .prompt
2077
- text-align: center
2078
- padding: 50px
2079
- line-height: 1.25
2080
2165
  a
2081
2166
  color: white
2082
- +glow_on_hover
2083
- .note
2084
- color: $pale
2085
- margin-top: 2px
2086
- &.hover
2087
- .img
2088
- .prompt
2089
- a
2090
- color: white
2091
- text-shadow: 0 0 3px white
2167
+ text-shadow: 0 0 3px white
2092
2168
 
2093
2169
  a.detach
2094
2170
  position: absolute