alchemy_cms 3.0.0.rc5 → 3.0.0.rc6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -5
  3. data/README.md +32 -5
  4. data/alchemy_cms.gemspec +1 -1
  5. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +3 -3
  6. data/app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee +19 -0
  7. data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +5 -0
  8. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +3 -2
  9. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +2 -0
  10. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +1 -1
  11. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +2 -26
  12. data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
  13. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +2 -0
  14. data/app/assets/javascripts/alchemy/alchemy.i18n.js.coffee +12 -7
  15. data/app/assets/javascripts/alchemy/alchemy.js +1 -1
  16. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +33 -4
  17. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +1 -1
  18. data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +2 -13
  19. data/app/assets/javascripts/alchemy/{alchemy.tinymce.js.coffee.erb → alchemy.tinymce.js.coffee} +1 -25
  20. data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +63 -105
  21. data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +3 -3
  22. data/app/assets/stylesheets/alchemy/_extends.scss +2 -8
  23. data/app/assets/stylesheets/alchemy/_mixins.scss +4 -9
  24. data/app/assets/stylesheets/alchemy/base.scss +6 -6
  25. data/app/assets/stylesheets/alchemy/buttons.scss +56 -29
  26. data/app/assets/stylesheets/alchemy/elements.scss +66 -14
  27. data/app/assets/stylesheets/alchemy/form_fields.scss +39 -6
  28. data/app/assets/stylesheets/alchemy/forms.scss +32 -0
  29. data/app/assets/stylesheets/alchemy/frame.scss +44 -44
  30. data/app/assets/stylesheets/alchemy/icons.scss +2 -2
  31. data/app/assets/stylesheets/alchemy/jquery-ui.scss +2 -0
  32. data/app/assets/stylesheets/alchemy/notices.scss +6 -0
  33. data/app/assets/stylesheets/alchemy/selects.scss +10 -0
  34. data/app/assets/stylesheets/alchemy/sitemap.scss +8 -10
  35. data/app/assets/stylesheets/alchemy/toolbar.scss +40 -31
  36. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +11 -22
  37. data/app/controllers/alchemy/admin/base_controller.rb +14 -1
  38. data/app/controllers/alchemy/admin/elements_controller.rb +4 -2
  39. data/app/controllers/alchemy/admin/layoutpages_controller.rb +5 -0
  40. data/app/controllers/alchemy/admin/legacy_page_urls_controller.rb +39 -0
  41. data/app/controllers/alchemy/admin/pages_controller.rb +0 -3
  42. data/app/controllers/alchemy/base_controller.rb +7 -4
  43. data/app/helpers/alchemy/admin/base_helper.rb +33 -3
  44. data/app/helpers/alchemy/pages_helper.rb +1 -1
  45. data/app/models/alchemy/element.rb +6 -4
  46. data/app/models/alchemy/legacy_page_url.rb +5 -1
  47. data/app/models/alchemy/message.rb +2 -2
  48. data/app/models/alchemy/page.rb +8 -9
  49. data/app/models/alchemy/page/{cells.rb → page_cells.rb} +1 -1
  50. data/app/models/alchemy/page/{elements.rb → page_elements.rb} +1 -1
  51. data/app/models/alchemy/page/{naming.rb → page_naming.rb} +33 -18
  52. data/app/models/alchemy/page/{natures.rb → page_natures.rb} +1 -1
  53. data/app/models/alchemy/page/{scopes.rb → page_scopes.rb} +1 -1
  54. data/app/models/alchemy/page/{users.rb → page_users.rb} +13 -1
  55. data/app/views/alchemy/admin/elements/_add_element_button.html.erb +18 -0
  56. data/app/views/alchemy/admin/elements/_add_picture.html.erb +1 -1
  57. data/app/views/alchemy/admin/elements/_element.html.erb +12 -11
  58. data/app/views/alchemy/admin/elements/_new_element_form.html.erb +3 -0
  59. data/app/views/alchemy/admin/elements/create.js.erb +3 -3
  60. data/app/views/alchemy/admin/elements/index.html.erb +19 -4
  61. data/app/views/alchemy/admin/elements/new.html.erb +3 -0
  62. data/app/views/alchemy/admin/elements/trash.js.erb +16 -12
  63. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -1
  64. data/app/views/alchemy/admin/layoutpages/edit.html.erb +11 -0
  65. data/app/views/alchemy/admin/layoutpages/index.html.erb +4 -16
  66. data/app/views/alchemy/admin/legacy_page_urls/_form.html.erb +5 -0
  67. data/app/views/alchemy/admin/legacy_page_urls/_label.html.erb +1 -0
  68. data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +13 -0
  69. data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +20 -0
  70. data/app/views/alchemy/admin/legacy_page_urls/create.js.erb +10 -0
  71. data/app/views/alchemy/admin/legacy_page_urls/destroy.js.erb +6 -0
  72. data/app/views/alchemy/admin/legacy_page_urls/update.js.erb +2 -0
  73. data/app/views/alchemy/admin/pages/_form.html.erb +58 -0
  74. data/app/views/alchemy/admin/pages/_internal_link.html.erb +9 -4
  75. data/app/views/alchemy/admin/pages/_legacy_urls.html.erb +23 -0
  76. data/app/views/alchemy/admin/pages/_locked_page.html.erb +21 -0
  77. data/app/views/alchemy/admin/pages/_page.html.erb +2 -2
  78. data/app/views/alchemy/admin/pages/_page_status.html.erb +11 -9
  79. data/app/views/alchemy/admin/pages/_tinymce_custom_config.html.erb +13 -0
  80. data/app/views/alchemy/admin/pages/configure.html.erb +16 -57
  81. data/app/views/alchemy/admin/pages/edit.html.erb +64 -66
  82. data/app/views/alchemy/admin/pages/index.html.erb +9 -19
  83. data/app/views/alchemy/admin/pages/update.js.erb +1 -1
  84. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +7 -12
  85. data/app/views/alchemy/admin/partials/_routes.html.erb +25 -0
  86. data/app/views/alchemy/admin/partials/_search_form.html.erb +10 -12
  87. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +53 -47
  88. data/app/views/alchemy/admin/pictures/index.html.erb +34 -29
  89. data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +1 -1
  90. data/app/views/alchemy/navigation/_link.html.erb +9 -9
  91. data/app/views/alchemy/pages/show.rss.builder +2 -2
  92. data/app/views/layouts/alchemy/admin.html.erb +20 -9
  93. data/bin/alchemy +1 -1
  94. data/config/alchemy/config.yml +1 -0
  95. data/config/locales/alchemy.de.yml +15 -1
  96. data/config/locales/alchemy.en.yml +29 -19
  97. data/config/locales/alchemy.nl.yml +11 -1
  98. data/config/routes.rb +2 -1
  99. data/lib/alchemy/errors.rb +2 -2
  100. data/lib/alchemy/permissions.rb +2 -0
  101. data/lib/alchemy/resource.rb +22 -9
  102. data/lib/alchemy/tinymce.rb +13 -7
  103. data/lib/alchemy/version.rb +1 -1
  104. data/spec/controllers/admin/base_controller_spec.rb +39 -0
  105. data/spec/controllers/admin/elements_controller_spec.rb +17 -14
  106. data/spec/controllers/admin/pages_controller_spec.rb +1 -2
  107. data/spec/controllers/pages_controller_spec.rb +7 -3
  108. data/spec/dummy/app/models/dummy_user.rb +12 -2
  109. data/spec/features/admin/dashboard_spec.rb +45 -0
  110. data/spec/features/admin/legacy_page_url_management_spec.rb +62 -0
  111. data/spec/features/admin/page_editing_feature_spec.rb +66 -6
  112. data/spec/features/page_feature_spec.rb +13 -0
  113. data/spec/helpers/admin/base_helper_spec.rb +36 -0
  114. data/spec/libraries/resource_spec.rb +168 -84
  115. data/spec/libraries/tinymce_spec.rb +10 -0
  116. data/spec/models/element_spec.rb +16 -0
  117. data/spec/models/legacy_page_url_spec.rb +21 -0
  118. data/spec/models/message_spec.rb +23 -7
  119. data/spec/models/page_spec.rb +89 -12
  120. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.min.js +1 -0
  121. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.min.js +1 -0
  122. metadata +96 -75
  123. data/app/assets/javascripts/alchemy/alchemy.routes.js.erb +0 -38
  124. data/spec/models/resource_spec.rb +0 -159
@@ -1,22 +1,6 @@
1
1
  # Alchemy Tinymce wrapper
2
2
  #
3
- window.Alchemy.Tinymce =
4
-
5
- # Holds the default Alchemy TinyMCE configuration
6
- #
7
- defaults:
8
- plugins: "<%= Alchemy::Tinymce.plugins.join(',') %>"
9
- <% Alchemy::Tinymce.init.each do |k, v| %>
10
- <%= k %>: <%= v.to_json %>
11
- <% end %>
12
-
13
- # Holds custom tinymce configurations
14
- #
15
- # The key has to be a unique selector in the format of: "element_name_content_name"
16
- #
17
- # The value has to be a valid tinymce configuration object.
18
- #
19
- customConfigs: {}
3
+ $.extend Alchemy.Tinymce,
20
4
 
21
5
  # Returns default config for a tinymce editor.
22
6
  #
@@ -80,11 +64,3 @@ window.Alchemy.Tinymce =
80
64
  editor = tinymce.get("tinymce_#{id}")
81
65
  if editor
82
66
  editor.remove()
83
-
84
- # Populate custom tinymce configurations
85
- <% Alchemy::Tinymce.custom_config_contents.each do |content| %>
86
- Alchemy.Tinymce.customConfigs["<%= content['element'] %>_<%= content['name'] %>"] =
87
- <% content.fetch('settings', {}).fetch('tinymce', {}).each do |k, v| %>
88
- <%= k %>: <%= v.to_json %>
89
- <% end %>
90
- <% end %>
@@ -1,110 +1,68 @@
1
1
  window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
2
2
 
3
- # Holds translations
3
+ # Holds translations for javascripts
4
4
  #
5
5
  Alchemy.translations =
6
6
 
7
- page_dirty_notice:
8
- en: "You have unsaved changes on this page. They will be lost if you continue."
9
- de: "Sie haben ungesicherte Änderungen auf der Seite. Diese gehen verloren, wenn Sie fortfahren."
10
- nl: "Er zijn wijzigingen op deze pagina aangebracht. Deze gaan verloren als u doorgaat."
11
- element_dirty_notice:
12
- en: "This element has unsaved changes. Do you really want to fold it?"
13
- de: "Dieses Element hat nicht gespeicherte Änderungen. Möchten Sie es wirklich einklappen?"
14
- nl: "Dit element bevat niet opgeslagen wijzigingen. Wilt u dit echt inklappen?"
15
- warning:
16
- en: 'Warning!'
17
- de: 'Achtung!'
18
- nl: 'Waarschuwing!'
19
- ok:
20
- en: 'Ok'
21
- de: 'Ok'
22
- nl: 'Ok'
23
- cancel:
24
- en: 'Cancel'
25
- de: 'Abbrechen'
26
- nl: 'Annuleren'
27
- browse:
28
- de: "durchsuchen"
29
- en: "browse"
30
- nl: "bladeren"
31
- pending:
32
- de: "Wartend..."
33
- en: "Pending..."
34
- nl: "Bezig..."
35
- uploading:
36
- de: "Ladend..."
37
- en: "Uploading..."
38
- nl: "Uploaden..."
39
- remaining:
40
- de: " verbleibend."
41
- en: " remaining."
42
- nl: " over."
43
- complete:
44
- de: "Abgeschlossen"
45
- en: "Complete"
46
- nl: "Klaar"
47
- cancelled:
48
- de: "Abgebrochen"
49
- en: "Cancelled"
50
- nl: "Afgebroken"
51
- stopped:
52
- de: "Gestoppt"
53
- en: "Stopped"
54
- nl: "Gestopt"
55
- upload_failed:
56
- de: "Fehlgeschlagen!"
57
- en: "Upload Failed!"
58
- nl: "Upload gestopt!"
59
- file_too_big:
60
- de: "Datei ist zu groß!"
61
- en: "File is too big!"
62
- nl: "Bestand is te groot!"
63
- upload_limit_exceeded:
64
- de: "Maximales Dateilimit erreicht."
65
- en: "Upload limit exceeded."
66
- nl: "Uploadlimiet bereikt."
67
- validation_failed:
68
- de: "Validierung fehlgeschlagen. Ladevorgang angehalten."
69
- en: "Failed Validation. Upload skipped."
70
- nl: "Validatiefout. Upload is stopgezet."
71
- zero_byte_file:
72
- de: "Datei hat keinen Inhalt!"
73
- en: "Cannot upload Zero Byte files!"
74
- nl: "Bestand is leeg!"
75
- invalid_file:
76
- de: "Ungültiger Dateityp!"
77
- en: "Invalid File Type!"
78
- nl: "Ongeldig bestandstype!"
79
- unknown_error:
80
- de: "Unbekannter Fehler!"
81
- en: "Unhandled Error!"
82
- nl: "Onbekende fout!"
83
- drag_files_notice:
84
- de: "Oder ziehen Sie die Dateien hier rauf"
85
- en: "Or drag files over here"
86
- nl: "Of sleep bestanden hier naartoe"
87
- drop_files_notice:
88
- de: "Lassen Sie die Dateien nun los"
89
- en: "Now drop the files"
90
- nl: "Laat nu de bestanden los"
91
- queued_files_notice:
92
- de: "x Dateien in der Warteschlange."
93
- en: "Queued x files."
94
- nl: "x bestanden in de wachtrij gezet."
95
- success_notice:
96
- de: "x Dateien hochgeladen."
97
- en: "Uploaded x files."
98
- nl: "x bestanden geupload."
99
- url_validation_failed:
100
- de: 'Die URL hat kein gültiges Format.'
101
- en: 'The url has no valid format.'
102
- nl: 'De url heeft geen geldig formaat.'
103
- click_to_edit:
104
- de: 'Klicken zum Bearbeiten'
105
- en: 'click to edit'
106
- nl: 'klik om aan te passen'
107
- help:
108
- de: 'Hilfe'
109
- en: 'Help'
110
- en: 'Hulp'
7
+ # German
8
+ de:
9
+ allowed_chars: 'von %{count} Zeichen'
10
+ cancel: 'Abbrechen'
11
+ cancelled: 'Abgebrochen'
12
+ click_to_edit: 'Klicken zum Bearbeiten'
13
+ complete: 'Abgeschlossen'
14
+ element_dirty_notice: 'Dieses Element hat nicht gespeicherte Änderungen. Möchten Sie es wirklich einklappen?'
15
+ help: 'Hilfe'
16
+ ok: 'Ok'
17
+ page_dirty_notice: 'Sie haben ungesicherte Änderungen auf der Seite. Diese gehen verloren, wenn Sie fortfahren.'
18
+ page_found: 'Seite gefunden'
19
+ pages_found: 'Seiten gefunden'
20
+ url_validation_failed: 'Die URL hat kein gültiges Format.'
21
+ warning: 'Achtung!'
22
+ 'File is too large': 'Datei ist zu groß.'
23
+ 'File is too small': 'Datei ist zu klein.'
24
+ 'File type not allowed': 'Dateityp nicht erlaubt.'
25
+ 'Maximum number of files exceeded': 'Maximale Anzahl an Dateien erreicht.'
26
+ 'Uploaded bytes exceed file size': 'Maximal erlaubte Dateigröße erreicht.'
27
+
28
+ # English
29
+ en:
30
+ allowed_chars: 'of %{count} chars'
31
+ cancel: 'Cancel'
32
+ cancelled: 'Cancelled'
33
+ click_to_edit: 'click to edit'
34
+ complete: 'Complete'
35
+ element_dirty_notice: 'This element has unsaved changes. Do you really want to fold it?'
36
+ help: 'Help'
37
+ ok: 'Ok'
38
+ page_dirty_notice: 'You have unsaved changes on this page. They will be lost if you continue.'
39
+ page_found: 'Page found'
40
+ pages_found: 'Pages found'
41
+ url_validation_failed: 'The url has no valid format.'
42
+ warning: 'Warning!'
43
+ 'File is too large': 'File is too large'
44
+ 'File is too small': 'File is too small'
45
+ 'File type not allowed': 'File type not allowed'
46
+ 'Maximum number of files exceeded': 'Maximum number of files exceeded.'
47
+ 'Uploaded bytes exceed file size': 'Uploaded bytes exceed file size'
48
+
49
+ # Dutch
50
+ nl:
51
+ allowed_chars: 'of %{count} chars'
52
+ cancel: 'Annuleren'
53
+ cancelled: 'Afgebroken'
54
+ click_to_edit: 'klik om aan te passen'
55
+ complete: 'Klaar'
56
+ element_dirty_notice: 'Dit element bevat niet opgeslagen wijzigingen. Wilt u dit echt inklappen?'
57
+ help: 'Hulp'
58
+ ok: 'Ok'
59
+ page_found: 'Page found'
60
+ pages_found: 'Pages found'
61
+ page_dirty_notice: 'Er zijn wijzigingen op deze pagina aangebracht. Deze gaan verloren als u doorgaat.'
62
+ url_validation_failed: 'De url heeft geen geldig formaat.'
63
+ warning: 'Waarschuwing!'
64
+ 'File is too large': 'File is too large'
65
+ 'File is too small': 'File is too small'
66
+ 'File type not allowed': 'File type not allowed'
67
+ 'Maximum number of files exceeded': 'Uploadlimiet bereikt.'
68
+ 'Uploaded bytes exceed file size': 'Uploaded bytes exceed file size'
@@ -46,7 +46,7 @@ Alchemy.Uploader = (settings) ->
46
46
  data.context.$fileProgressCancel.click (e) ->
47
47
  e.preventDefault()
48
48
  data.context.setCancelled()
49
- data.context.setStatus('Upload cancelled')
49
+ data.context.setStatus('cancelled')
50
50
  false
51
51
  false
52
52
  else
@@ -55,7 +55,7 @@ Alchemy.Uploader = (settings) ->
55
55
  e.preventDefault()
56
56
  xhr.abort()
57
57
  data.context.setCancelled()
58
- data.context.setStatus('Upload cancelled')
58
+ data.context.setStatus('cancelled')
59
59
  false
60
60
  xhr
61
61
  progress: (e, data) ->
@@ -70,7 +70,7 @@ Alchemy.Uploader = (settings) ->
70
70
  completedUploads += 1
71
71
  $('.uploaded-files-count').text(completedUploads)
72
72
  data.context.setComplete()
73
- data.context.setStatus('Completed')
73
+ data.context.setStatus('complete')
74
74
  response_data = data.xhr().response
75
75
  if completedUploads == totalFilesCount
76
76
  completedUploads = 0
@@ -60,18 +60,10 @@
60
60
  @include box-shadow(inset 1px 1px 4px rgba($error_border_color, 0.5));
61
61
  }
62
62
 
63
- %border-radius-reset {
64
- @include border-radius(0);
65
- }
66
-
67
63
  %blue-focus-style {
68
64
  @include default-focus-style;
69
65
  }
70
66
 
71
- %white-focus-style {
72
- @include default-focus-style(rgba(white, 0.5), none);
73
- }
74
-
75
67
  %default-input-style {
76
68
  @include box-sizing(border-box);
77
69
  $border-inset-color: lighten($default-border-color, 20%);
@@ -102,4 +94,6 @@
102
94
 
103
95
  %gradiated-toolbar {
104
96
  background: $medium-gray;
97
+ padding: 8px 4px;
98
+ height: 29px;
105
99
  }
@@ -1,13 +1,8 @@
1
- @mixin default-focus-style($bg-color: $very-light-blue, $border: 1px solid $blue) {
2
- background-color: $bg-color;
3
- border: $border;
4
- @include box-shadow(0 0 6px $blue, inset 0 0 4px $light-blue);
1
+ @mixin default-focus-style {
2
+ border-color: $blue;
3
+ @include box-shadow(0 0 2px 2px $blue);
5
4
  outline: none;
6
- @include transition(
7
- box-shadow 0.25s ease-in-out,
8
- background-color 0.25s ease-in-out,
9
- border 0.25s ease-in-out
10
- );
5
+ @include transition(all 0.25s ease-in-out);
11
6
 
12
7
  &::-moz-focus-inner {
13
8
  border: none !important;
@@ -68,7 +68,7 @@ a {
68
68
  }
69
69
 
70
70
  &:focus {
71
- @extend %white-focus-style;
71
+ @extend %blue-focus-style;
72
72
  color: black;
73
73
  }
74
74
 
@@ -235,10 +235,6 @@ div#page_editing_menu {
235
235
  margin-top: 1em;
236
236
  }
237
237
 
238
- div.table_right span.tools a.icon_button img {
239
- left: -1px;
240
- }
241
-
242
238
  li.even {
243
239
  background-color: #fff;
244
240
  }
@@ -546,6 +542,10 @@ select#url_protocol.medium {
546
542
  overflow-x: hidden;
547
543
  overflow-y: auto;
548
544
  margin-bottom: 1em;
545
+
546
+ .insert-element-button {
547
+ display: none;
548
+ }
549
549
  }
550
550
 
551
551
  .mceEditor table {
@@ -560,7 +560,7 @@ div.browse {
560
560
  @include box-sizing(border-box);
561
561
  position: absolute;
562
562
  left: 66px;
563
- top: 80px;
563
+ top: 75px;
564
564
  width: auto;
565
565
  height: auto;
566
566
  border: 0 none;
@@ -49,10 +49,9 @@ button, input[type="submit"], a.button, input.button {
49
49
  }
50
50
 
51
51
  .icon_button {
52
- @extend %button-defaults;
53
52
  width: 21px;
54
53
  height: 21px;
55
- line-height: 19px;
54
+ line-height: 21px;
56
55
  margin: 0;
57
56
  padding: 3px;
58
57
  overflow: hidden;
@@ -65,7 +64,7 @@ button, input[type="submit"], a.button, input.button {
65
64
 
66
65
  .icon {
67
66
  @include inline-block;
68
- vertical-align: middle;
67
+ margin-top: -2px;
69
68
  }
70
69
 
71
70
  .old_icon {
@@ -100,9 +99,10 @@ button, input[type="submit"], a.button, input.button {
100
99
  left: auto;
101
100
  position: absolute;
102
101
  left: 1px;
103
- top: 2px;
102
+ top: 3px;
104
103
  width: 8px;
105
104
  height: 8px;
105
+ margin-top: 0;
106
106
 
107
107
  &:before {
108
108
  line-height: 10px;
@@ -117,7 +117,7 @@ button, input[type="submit"], a.button, input.button {
117
117
  border: $default-border-width $default-border-style $button-hover-border-color;
118
118
  @include border-radius($default-border-radius);
119
119
  background: $button-hover-bg-color;
120
- top: -1px;
120
+ top: 0px;
121
121
  right: 0px;
122
122
 
123
123
  .icon {
@@ -164,43 +164,38 @@ button, input[type="submit"], a.button, input.button {
164
164
  }
165
165
 
166
166
  button.icon_button {
167
- width: 29px;
168
- height: 29px;
167
+ background: transparent;
168
+ border: 0 none;
169
+ @include border-radius(0);
170
+ @include box-shadow(none);
171
+ @include box-sizing(content-box);
169
172
  }
170
173
 
171
174
  #new_element button.button {
172
175
  float: right;
173
176
  }
174
177
 
175
- div#toolbar label {
176
- @include default-label-style;
177
- }
178
-
179
178
  .button_with_label {
179
+ position: relative;
180
180
  @include inline-block(top);
181
181
  text-align: center;
182
- margin-right: 8px;
183
- margin-left: 8px;
184
- min-width: 70px;
182
+ margin: 0 2*$default-margin;
185
183
  line-height: 0;
186
184
 
187
- label {
188
- @include default-label-style;
189
- }
190
-
191
- &.active {
185
+ &.active, &:active {
192
186
 
193
187
  .icon_button {
194
- $second-color: darken($sb-base-color, 10%);
195
- @include sassy-button-active-shadow($second-color);
196
- background-color: $second-color;
197
- @include background(linear-gradient(color-stops(darken($sb-base-color, 2%), $second-color 50%, darken($second-color, 8%))))
188
+ background-color: darken($sb-base-color, 10%);
189
+ border: $default-border;
190
+ padding: 2px;
191
+ @extend %rounded-border;
198
192
  }
193
+ }
199
194
 
200
- label {
201
- color: black;
202
- text-shadow: white 0 0 2px;
203
- }
195
+ &:hover .icon_button {
196
+ border: $default-border;
197
+ padding: 2px;
198
+ @extend %rounded-border;
204
199
  }
205
200
 
206
201
  .select2-container {
@@ -222,6 +217,38 @@ div#toolbar label {
222
217
  }
223
218
  }
224
219
 
225
- div.sitemap_right_tools .sitemap_sitetools a.icon_button {
226
- margin-right: 4px;
220
+ .button_with_label, .button_group {
221
+
222
+ .icon_button {
223
+ width: 23px;
224
+ height: 23px;
225
+ line-height: 23px;
226
+ }
227
+
228
+ label {
229
+ display: none;
230
+ position: absolute;
231
+ top: -25px;
232
+ left: 50%;
233
+ margin-left: -13px;
234
+ z-index: 30;
235
+ background: $dark-gray;
236
+ color: #fff;
237
+ padding: $default-padding 2*$default-padding;
238
+ @extend %rounded-border;
239
+ line-height: 1;
240
+ @include box-shadow(0 0 4px $default-border-color);
241
+ white-space: nowrap;
242
+
243
+ &:before {
244
+ content: '';
245
+ position: absolute;
246
+ bottom: -10px;
247
+ left: 8px;
248
+ border: 5px transparent solid;
249
+ border-top-color: $dark-gray;
250
+ }
251
+ }
252
+
253
+ &:hover label { display: block }
227
254
  }