ab_admin 0.8.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +11 -5
  4. data/app/assets/javascripts/ab_admin/components/admin_assets.js.coffee +0 -25
  5. data/app/assets/javascripts/ab_admin/components/google_translate.js.coffee +3 -5
  6. data/app/assets/javascripts/ab_admin/components/in_place_edit.js.coffee +5 -1
  7. data/app/assets/javascripts/ab_admin/core/columns_hider.js.coffee +24 -23
  8. data/app/assets/javascripts/ab_admin/core/init.js.coffee +6 -2
  9. data/app/assets/javascripts/ab_admin/core/search_form.js.coffee +1 -7
  10. data/app/assets/javascripts/ab_admin/core/ui_utils.js.coffee +2 -6
  11. data/app/assets/javascripts/ab_admin/core/utils.js.coffee +8 -2
  12. data/app/assets/javascripts/ab_admin/main.js +2 -2
  13. data/app/assets/stylesheets/ab_admin/bootstrap_and_overrides.scss +35 -10
  14. data/app/assets/stylesheets/ab_admin/components/_base.scss +21 -1
  15. data/app/assets/stylesheets/ab_admin/components/_form.scss +13 -17
  16. data/app/assets/stylesheets/ab_admin/components/_grid_view.scss +2 -2
  17. data/app/assets/stylesheets/ab_admin/components/_locale_tabs.scss +11 -23
  18. data/app/assets/stylesheets/ab_admin/components/_navigation.scss +0 -9
  19. data/app/assets/stylesheets/ab_admin/components/_table_view.scss +10 -2
  20. data/app/assets/stylesheets/ab_admin/components/_tooltip.scss +80 -0
  21. data/app/assets/stylesheets/ab_admin/components/_tree_view.scss +1 -1
  22. data/app/assets/stylesheets/ab_admin/devise.scss +2 -2
  23. data/app/assets/stylesheets/ab_admin/fileupload.scss +2 -9
  24. data/app/assets/stylesheets/ab_admin/main.scss +0 -1
  25. data/app/controllers/admin/base_controller.rb +67 -63
  26. data/app/controllers/admin/dashboards_controller.rb +2 -2
  27. data/app/controllers/admin/locators_controller.rb +8 -6
  28. data/app/controllers/admin/manager_controller.rb +2 -2
  29. data/app/controllers/admin/static_pages_controller.rb +0 -4
  30. data/app/controllers/admin/structures_controller.rb +2 -2
  31. data/app/views/admin/assets/batch_edit.html.slim +1 -1
  32. data/app/views/admin/base/_search_layout.html.slim +6 -5
  33. data/app/views/admin/base/create.js.erb +5 -2
  34. data/app/views/admin/base/index.html.slim +4 -4
  35. data/app/views/admin/base/update.js.erb +5 -0
  36. data/app/views/admin/fileupload/_asset_templates.html.slim +1 -2
  37. data/app/views/admin/fileupload/_image.html.slim +1 -2
  38. data/app/views/admin/locators/edit.html.slim +7 -6
  39. data/app/views/admin/manager/_map.html.slim +4 -0
  40. data/app/views/admin/manager/_table.html.slim +1 -1
  41. data/app/views/admin/shared/_content_actions.html.slim +19 -21
  42. data/app/views/admin/shared/_flash.html.slim +5 -4
  43. data/app/views/admin/shared/_locale_tabs.html.slim +2 -2
  44. data/app/views/admin/shared/_main_menu.html.slim +1 -1
  45. data/app/views/admin/structures/_form.html.slim +1 -1
  46. data/app/views/admin/users/_form.html.slim +1 -1
  47. data/app/views/admin/users/_search_form.html.slim +1 -1
  48. data/app/views/layouts/admin/_footer.html.slim +0 -1
  49. data/app/views/layouts/admin/_navigation.html.slim +1 -1
  50. data/app/views/layouts/admin/application.html.slim +2 -2
  51. data/config/locales/de.yml +1 -2
  52. data/config/locales/en.yml +1 -2
  53. data/config/locales/ru.yml +0 -1
  54. data/config/locales/uk.yml +0 -1
  55. data/lib/ab_admin.rb +34 -33
  56. data/lib/ab_admin/abstract_resource.rb +1 -1
  57. data/lib/ab_admin/carrierwave/base_uploader.rb +1 -2
  58. data/lib/ab_admin/concerns/admin_addition.rb +0 -30
  59. data/lib/ab_admin/concerns/translations_macro.rb +97 -0
  60. data/lib/ab_admin/concerns/utilities.rb +1 -1
  61. data/lib/ab_admin/config/base.rb +7 -0
  62. data/lib/ab_admin/controllers/callbacks.rb +3 -26
  63. data/lib/ab_admin/core_ext/array.rb +4 -48
  64. data/lib/ab_admin/core_ext/hash.rb +2 -31
  65. data/lib/ab_admin/core_ext/other.rb +0 -6
  66. data/lib/ab_admin/core_ext/string.rb +0 -80
  67. data/lib/ab_admin/engine.rb +1 -0
  68. data/lib/ab_admin/hooks/will_paginate_id_prefetch.rb +8 -6
  69. data/lib/ab_admin/hooks/will_paginate_no_uri.rb +1 -1
  70. data/lib/ab_admin/i18n_tools/google_translate.rb +3 -1
  71. data/lib/ab_admin/i18n_tools/model_translator.rb +1 -1
  72. data/lib/ab_admin/models/header.rb +2 -2
  73. data/lib/ab_admin/models/locator.rb +28 -2
  74. data/lib/ab_admin/models/user.rb +12 -48
  75. data/lib/ab_admin/utils/csv_document.rb +5 -3
  76. data/lib/ab_admin/utils/eval_helpers.rb +6 -3
  77. data/lib/ab_admin/utils/xls_document.rb +18 -16
  78. data/lib/ab_admin/version.rb +1 -1
  79. data/lib/ab_admin/views/admin_helpers.rb +10 -12
  80. data/lib/ab_admin/views/admin_navigation_helpers.rb +7 -8
  81. data/lib/ab_admin/views/form_builder.rb +7 -5
  82. data/lib/ab_admin/views/helpers.rb +0 -9
  83. data/lib/ab_admin/views/inputs/ckeditor_input.rb +4 -4
  84. data/lib/ab_admin/views/manager_helpers.rb +8 -5
  85. data/lib/ab_admin/views/search_form_builder.rb +2 -2
  86. data/lib/ab_admin/views/will_paginate_bootstrap_renderer.rb +60 -0
  87. data/lib/generators/ab_admin/glob/glob_generator.rb +4 -5
  88. data/lib/generators/ab_admin/glob/templates/migration.erb +10 -7
  89. data/lib/generators/ab_admin/install/templates/config/ab_admin.rb.erb +1 -1
  90. data/lib/generators/ab_admin/install/templates/models/user.rb +0 -11
  91. data/lib/generators/ab_admin/install/templates/spec/spec_helper.rb +0 -1
  92. data/lib/generators/ab_admin/install/templates/spec/support/database_cleaner.rb +8 -11
  93. data/lib/generators/ab_admin/model/model_generator.rb +3 -4
  94. data/lib/generators/ab_admin/model/templates/resource.erb +5 -2
  95. data/lib/generators/ab_admin/resource/templates/controller.erb +2 -2
  96. metadata +37 -79
  97. data/app/assets/images/admin/Jcrop.gif +0 -0
  98. data/app/assets/images/admin/flags/de.png +0 -0
  99. data/app/assets/images/admin/flags/en.png +0 -0
  100. data/app/assets/images/admin/flags/es.png +0 -0
  101. data/app/assets/images/admin/flags/fr.png +0 -0
  102. data/app/assets/images/admin/flags/it.png +0 -0
  103. data/app/assets/images/admin/flags/ja.png +0 -0
  104. data/app/assets/images/admin/flags/pl.png +0 -0
  105. data/app/assets/images/admin/flags/ru.png +0 -0
  106. data/app/assets/images/admin/flags/uk.png +0 -0
  107. data/app/assets/javascripts/ab_admin/components/croppable_image.js.coffee +0 -33
  108. data/app/assets/stylesheets/ab_admin/components/_columns_hider.scss +0 -5
  109. data/app/assets/stylesheets/ab_admin/components/_perms.scss +0 -39
  110. data/app/views/admin/shared/_columns_hider.html.slim +0 -9
  111. data/lib/ab_admin/hooks/globalize_locale_suffix_accessors.rb +0 -25
  112. data/lib/ab_admin/hooks/globalize_valid_locale.rb +0 -9
  113. data/lib/generators/ab_admin/ckeditor_assets/ckeditor_assets_generator.rb +0 -19
  114. data/lib/generators/template.rb +0 -96
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43ed57227cecaa2f87430c9c4d91b091a481d63a7c114f11815475d035d7c0fa
4
- data.tar.gz: 3c468bae1894700743f5c78d9c833c57ece9638179174294e6a1ba90dd2cae54
3
+ metadata.gz: e9ac96fefdb305b914a27a302af787dfd92e1bfa9ec02d6078579f26d1c49f87
4
+ data.tar.gz: 59026b1d51c0d63026d8655a69e2a536fb52e919e3c3babe2abd74996757dac5
5
5
  SHA512:
6
- metadata.gz: f172fa06ba23701ba8d0849267642bbe51485951aed25d1f686a342b7b770d5983b0387886cc544c83269e653d026e31cae9fb3b2eacd40c2c5e402b2c032b3d
7
- data.tar.gz: c90de19869723ace5d640bfc0b426cbfa7982f1555312dee5b990cf8a523bb09d4468c7fb1fd3297d5181987a892897638e8411690a06474539de0bb42e687fc
6
+ metadata.gz: 53db71976b5d9bfb9f0647a3c3ab1f536ee14a514d2ed3269fa468b5a94fc3c17588c1542c7c315e9a4c4853e86a7bc0ea4891890a26a4583222bd7e7ceab871
7
+ data.tar.gz: d19391ed5b4323dd40cbc0df5ccc1728447f4f54c262ebbb0ec01520f6efc8af30e3bf24ee01c3ef5d5b324fb0887368e897a964c850ab63e9870e1686dff935
@@ -1,4 +1,4 @@
1
- Copyright 2013 YOURNAME
1
+ Copyright 2013 Alex Leshchenko
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -4,13 +4,19 @@ Simple and real-life tested Rails::Engine admin interface based on slim, bootstr
4
4
 
5
5
  ## Installation
6
6
 
7
- To build a new Rails application with AbAdmin, run:
7
+ Add this line to your application's Gemfile:
8
8
 
9
- ```bash
10
- rails new [my_app_name] -m https://raw.githubusercontent.com/leschenko/ab_admin/master/lib/generators/template.rb
11
- ```
9
+ gem 'simple_slug'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install simple_slug
12
18
 
13
- Or add gems from template [list of gems](https://raw.githubusercontent.com/leschenko/ab_admin/master/lib/generators/template.rb) to an existing application and run generators:
19
+ Run generators
14
20
 
15
21
  ```bash
16
22
  rails generate devise:install
@@ -5,13 +5,6 @@
5
5
  #= require fileupload/jquery.fileupload-validate
6
6
  #= require ab_admin/components/base_assets
7
7
 
8
- #q= require ab_admin/jquery.Jcrop
9
- #q= require ab_admin/components/croppable_image
10
-
11
- #q=require fileupload/jquery.fileupload-image
12
- #q=require fileupload/jquery.fileupload-audio
13
- #q=require fileupload/jquery.fileupload-video
14
-
15
8
  class window.AdminAssets extends BaseAssets
16
9
  showErrors: (e, data) ->
17
10
  errors = _.map(data.files,(file) ->
@@ -20,29 +13,11 @@ class window.AdminAssets extends BaseAssets
20
13
 
21
14
  initDisabled: ->
22
15
  super
23
- @initFancybox() if $.fn.fancybox
24
16
 
25
17
  initHandlers: ->
26
18
  super
27
- @initFancybox() if $.fn.fancybox
28
- @initCrop() if @options.crop
29
19
  @initEditMeta() if @options.edit_meta
30
20
 
31
- initFancybox: =>
32
- @list.find("a.fancybox")
33
- .click (e) ->
34
- e.preventDefault()
35
- .fancybox
36
- afterShow: =>
37
- @crop?.fancyboxHandler()
38
- helpers:
39
- overlay:
40
- locked: false
41
-
42
- initCrop: ->
43
- return unless $.fn.Jcrop
44
- @crop = new CroppableImage(@el, @options.crop)
45
-
46
21
  initEditMeta: ->
47
22
  @el.find('.fileupload-edit-button').show().click =>
48
23
  ids = @el.find('.fileupload-list .fileupload-asset').map(-> $(this).data('id')).get()
@@ -20,8 +20,7 @@ window.translate = (text, element, from, to) ->
20
20
  window.google_t = (text, element, from, to) ->
21
21
  return '' unless $.trim(text)
22
22
  opts = {q: text, from: from, to: to}
23
- $.post '/admin/translate', opts, ((data) =>
24
- element.inputVal $.unescape(data.text).replace(/%\s{/g, ' %{')), 'json'
23
+ $.post '/admin/translate', opts, ((data) => element.inputVal $.unescape(data.text)), 'json'
25
24
 
26
25
  # get value of text field or CKEDITOR area
27
26
  $.fn.inputVal = (v = null) ->
@@ -45,13 +44,12 @@ $.fn.inputVal = (v = null) ->
45
44
  $el.val()
46
45
 
47
46
  class window.GoogleLocaleTabs
48
- @locales = ['ru', 'en', 'it']
49
47
  constructor: ->
50
- @locales = GoogleLocaleTabs.locales
48
+ @locales = $('.locale_tabs:first .nav-tabs a').map(-> $(this).attr('href').replace('#', '') ).get()
51
49
  @limit = 10000
52
50
  html = '<div class="t_locales">'
53
51
  for l in @locales
54
- html += "<div class='t_locale t_locale_#{l}'></div>"
52
+ html += "<div class='t_locale t_locale_#{l}'>#{localeToFlag(l)}</div>"
55
53
  html += '</div>'
56
54
  @html = $(html)
57
55
  $('.locale_tabs:not(".no_translate") .tab-pane').prepend(@html)
@@ -26,7 +26,7 @@ EditableForm.prototype.saveWithUrlHook = (value) ->
26
26
  EditableForm.prototype.saveWithoutUrlHook = EditableForm.prototype.save
27
27
  EditableForm.prototype.save = EditableForm.prototype.saveWithUrlHook
28
28
 
29
- $(document).on 'admin:init', (e) ->
29
+ window.initInPlaceEditable = ->
30
30
  $('.editable').editable
31
31
  onblur: 'submit'
32
32
  placement: 'bottom'
@@ -50,6 +50,10 @@ $(document).on 'admin:init', (e) ->
50
50
  withCredentials: true
51
51
  headers:
52
52
  Accept: 'application/json'
53
+
54
+
55
+ $(document).on 'admin:init', initInPlaceEditable
56
+
53
57
  $ ->
54
58
  _.each $('.editable'), (el) ->
55
59
  $el = $(el)
@@ -1,18 +1,36 @@
1
1
  class window.ColumnsHider
2
2
  constructor: ->
3
3
  @store_key = 'cols'
4
- @data_el = $('#columns_hider_data')
5
4
  @column_names = @columnNames()
6
5
  @collection_name = window.location.href.match(/admin\/(\w+)/)?[1]
7
6
  return unless @collection_name
8
7
  @data = @getData()
9
- @initDefaults()
10
8
  @initButtons()
11
9
  @initHandlers()
12
10
  @refreshColumns()
13
11
 
14
- initDefaults: ->
15
- @data
12
+ initHandlers: ->
13
+ $(document).on 'pjax:end admin:list_init', =>
14
+ @initButtons()
15
+ @refreshColumns()
16
+
17
+ $(document).on 'click', '#columns_hider_wrap label', (e) =>
18
+ e.preventDefault()
19
+ e.stopPropagation()
20
+ $input = $(e.currentTarget).find('input')
21
+ $input.prop('checked', !$input.is(':checked'))
22
+ colIds = _.map $('#columns_hider_wrap .dropdown-menu input:not(:checked)'), (el) -> parseInt($(el).val())
23
+ @data[@collection_name] = colIds
24
+ @refreshColumns()
25
+ @setData()
26
+
27
+ initButtons: ->
28
+ $menu = $('#columns_hider_wrap .dropdown-menu')
29
+ $menu.empty()
30
+ for col, i in @column_names
31
+ isActive = !_.include(@data[@collection_name], i)
32
+ html = "<label class='checkbox'><input type='checkbox' #{'checked' if isActive} value='#{i}'>#{col.name}</label>"
33
+ $menu.append(html)
16
34
 
17
35
  setData: ->
18
36
  res = {}
@@ -33,27 +51,10 @@ class window.ColumnsHider
33
51
  data[@collection_name].push(i) if col.disabled
34
52
  data
35
53
 
36
- initButtons: ->
37
- @data_el.empty()
38
- for col, i in @column_names
39
- css_class = if _.include(@data[@collection_name], i) then 'active' else ''
40
- html = "<button class='btn btn-primary #{css_class}' data-val='#{i}'>#{col.name}</button>"
41
- @data_el.append(html)
42
-
43
54
  columnNames: ->
44
55
  _.map $('#list > thead > tr > th'), (el) ->
45
56
  $el = $(el)
46
- {disabled: $el.hasClass('hide_cell'), name: $.trim($el.text().replace(/[▼▲]/g, ''))}
47
-
48
- initHandlers: ->
49
- $('#submit_columns_hider').click =>
50
- col_ids = _.map $('#columns_hider_data .active'), (el) -> $(el).data('val')
51
- @data[@collection_name] = col_ids
52
- $('#columns_hider').modal('hide')
53
- @refreshColumns()
54
- @setData()
55
- $(document).on 'pjax:end admin:list_init', =>
56
- @refreshColumns()
57
+ {disabled: $el.hasClass('hide_cell'), name: $.trim($el.text().replace(/[▼▲]/g, '')) || ' - '}
57
58
 
58
59
  refreshColumns: ->
59
60
  if @data[@collection_name]
@@ -69,4 +70,4 @@ class window.ColumnsHider
69
70
  $("#list > thead > tr > th, #list > tbody > tr > td").show()
70
71
 
71
72
  $ ->
72
- window.columns_hider = new ColumnsHider()
73
+ window.columnsHider = new ColumnsHider()
@@ -23,14 +23,12 @@ $ ->
23
23
  e.preventDefault()
24
24
  $(this).closest('tr').remove()
25
25
 
26
- $(document).on 'admin:init', ->
27
26
  $form = $('form.simple_form')
28
27
  window.resource_id = $form.data('id')
29
28
  $form.trigger('admin:form_init')
30
29
 
31
30
  $(document).on 'admin:list_init', ->
32
31
  initPopover()
33
- initTooltip()
34
32
 
35
33
  $(document).on 'admin:form_init', 'form', ->
36
34
  initEditor()
@@ -58,3 +56,9 @@ $ ->
58
56
  $('body').css('background-color', "##{window.fv.bg_color.replace(/^#/, '')}")
59
57
 
60
58
  initHotkeys() if window.fv?.hotkeys
59
+
60
+ clipboard = new Clipboard('.js-copy')
61
+ clipboard.on 'success', (e) ->
62
+ $el = $(e.trigger)
63
+ $el.addClass('js-copy-popup')
64
+ setTimeout((-> $el.removeClass('js-copy-popup')), 1200)
@@ -4,12 +4,6 @@ $ ->
4
4
  $el = $(this)
5
5
  $el.next('input').attr('name', "q[#{$el.val()}]")
6
6
 
7
- # $("#search_form").submit ->
8
- # $("#search_form [name$='_at_gteq]']").val (i, v) ->
9
- # v + " 00:00" if v
10
- # $("#search_form [name$='_at_lteq]']").val (i, v) ->
11
- # v + " 23:59" if v
12
-
13
- $('#search_cancel').click (e) ->
7
+ $('.js-search-cancel').click (e) ->
14
8
  e.preventDefault()
15
9
  window.location.search = ""
@@ -22,16 +22,12 @@ window.initAcFileds = ->
22
22
  maxHeight: 400
23
23
  width: 220
24
24
 
25
- window.initTooltip = ->
26
- $('.js-tooltip').tooltip
27
- animation: false
28
-
29
25
  window.initEditor = (baseSelector='form') ->
30
26
  return if fv.test
31
27
  $("#{baseSelector} .do_wysihtml5").each ->
32
28
  $el = $(this)
33
29
  return if $el.hasClass('wysihtml5_done')
34
- editor = $el.wysihtml5({html: true, locale: 'ru'}).data('wysihtml5').editor
30
+ editor = $el.wysihtml5({html: true, locale: 'en'}).data('wysihtml5').editor
35
31
  resizeIframe = -> editor.composer.iframe.style.height = editor.composer.element.scrollHeight + "px"
36
32
  editor.on "load", ->
37
33
  if editor.composer
@@ -50,7 +46,7 @@ window.inputBtnClose = ->
50
46
  $(this).closest('.close-wrap').remove()
51
47
 
52
48
  window.flash = (message, type='notice') ->
53
- $("<div class='alert alert-#{type}'><a class='close' data-dismiss='alert'>×</a>#{message}</div>").insertBefore $('#container')
49
+ $("<div class='alert alert-#{type}'><a class='close' data-dismiss='alert'>×</a>#{message}</div>").prependTo $('#flash')
54
50
 
55
51
  window.focusInput = (scope=null) ->
56
52
  scope ||= $('form.simple_form:first')
@@ -1,7 +1,7 @@
1
1
  window.fv ||= {}
2
2
  window.I18n ||= {}
3
- I18n.locale = window.fv.locale || 'ru'
4
- window.locale_path = if I18n.locale == 'ru' then '' else "/#{I18n.locale}"
3
+ I18n.locale = window.fv.locale || 'en'
4
+ window.locale_path = if I18n.locale == 'en' then '' else "/#{I18n.locale}"
5
5
 
6
6
  _.sum = (obj) ->
7
7
  return 0 if not $.isArray(obj) or obj.length is 0
@@ -168,3 +168,9 @@ window.storeData = (key, data) ->
168
168
 
169
169
  window.fetchData = (key) ->
170
170
  window.localStorage?[key] or $.cookie(key)
171
+
172
+ window.localeToFlag = (l) ->
173
+ l = l.toUpperCase()
174
+ l = {'JA': 'JP', 'EN': 'GB', 'UK': 'UA'}[l] || l
175
+ chars = {"A":"🇦","B":"🇧","C":"🇨","D":"🇩","E":"🇪","F":"🇫","G":"🇬","H":"🇭","I":"🇮","J":"🇯","K":"🇰","L":"🇱","M":"🇲","N":"🇳","O":"🇴","P":"🇵","Q":"🇶","R":"🇷","S":"🇸","T":"🇹","U":"🇺","V":"🇻","W":"🇼","X":"🇽","Y":"🇾","Z":"🇿"}
176
+ l.replace /[A-Z]/g, (m) -> chars[m]
@@ -7,7 +7,7 @@
7
7
  //= require jquery.cookie
8
8
  //= require jquery.pjax
9
9
  //= require jquery.hotkeys
10
- //= require bootstrap
10
+ //= require bootstrap_2_3_2/bootstrap
11
11
  //= require ab_admin/jquery_nested_form
12
12
  //= require ab_admin/bootstrap-tab-multi
13
13
  //= require ab_admin/bootstrap-datetimepicker/bootstrap-datetimepicker
@@ -18,9 +18,9 @@
18
18
  //= require ab_admin/bootstrap-editable
19
19
  //= require ab_admin/bootbox.min
20
20
  //= require select2
21
- //= require fancybox
22
21
  //= require ab_admin/jquery-ui-1.10.3.custom.min
23
22
  //= require jquery.ui.nestedSortable
23
+ //= require clipboard.min
24
24
  //= require ab_admin/components/sortable_tree
25
25
  //= require ab_admin/components/google_translate
26
26
  //= require ab_admin/components/locator
@@ -1,8 +1,8 @@
1
1
  $baseFontSize: 13px !default;
2
2
  $baseLineHeight: 18px !default;
3
3
 
4
- @import "bootstrap";
5
- @import "bootstrap-responsive";
4
+ @import "bootstrap_2_3_2/bootstrap";
5
+ @import "bootstrap_2_3_2/bootstrap-responsive";
6
6
  @import "ab_admin/components/base";
7
7
  @import "ab_admin/components/navigation";
8
8
  @import "ab_admin/components/table_view";
@@ -13,11 +13,10 @@ $baseLineHeight: 18px !default;
13
13
  @import "ab_admin/components/colored_tabs";
14
14
  @import "ab_admin/components/locale_tabs";
15
15
  @import "ab_admin/components/translations";
16
- @import "ab_admin/components/perms";
17
16
  @import "ab_admin/components/admin_comments";
18
17
  @import "ab_admin/components/geo_input";
19
18
  @import "ab_admin/components/view_layout";
20
- @import "ab_admin/components/columns_hider";
19
+ @import "ab_admin/components/tooltip";
21
20
 
22
21
  img {
23
22
  max-width: none;
@@ -130,6 +129,7 @@ label.input_set, label.label-large, .label.label-large {
130
129
  font-size: 15px;
131
130
  padding: 4px 10px 6px;
132
131
  display: block;
132
+ text-align: center;
133
133
  }
134
134
 
135
135
  label.label-med {
@@ -167,16 +167,41 @@ label.control-label.label-reset {
167
167
  }
168
168
  }
169
169
 
170
- // utility
171
- .over {
172
- overflow: visible !important;
170
+ .js-copy-popup {
171
+ position: relative;
172
+ &:before {
173
+ content: none;
174
+ }
175
+ &:after {
176
+ background-color: transparent;
177
+ padding: 0;
178
+ animation: text-pop-up-top 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
179
+ content: 'Copied!';
180
+ position: absolute;
181
+ color: #468847;
182
+ font-size: 14px;
183
+ left: -5px;
184
+ top: -5px;
185
+ }
173
186
  }
187
+ @keyframes text-pop-up-top {
188
+ 0% {
189
+ transform: translateY(0);
190
+ transform-origin: 50% 50%;
191
+ }
192
+ 95% {
193
+ opacity: 0.9;
194
+ }
195
+ 100% {
196
+ transform: translateY(-30px);
197
+ transform-origin: 50% 50%;
198
+ opacity: 0;
199
+ }
200
+ }
201
+
174
202
  .clear {
175
203
  clear: both;
176
204
  }
177
- .inline_block {
178
- display: inline-block;
179
- }
180
205
  .white-space-nowrap {
181
206
  white-space: nowrap;
182
207
  }
@@ -21,7 +21,10 @@ html, body {
21
21
  margin: 0 0 20px -253px;
22
22
  float: left;
23
23
  &.well {
24
- width: 220px;
24
+ width: 240px;
25
+ }
26
+ &.well-tiny {
27
+ padding: 5px;
25
28
  }
26
29
  }
27
30
  .content_with_sidebar {
@@ -39,6 +42,23 @@ html, body {
39
42
  }
40
43
  }
41
44
 
45
+ #flash {
46
+ position: fixed;
47
+ bottom: 0;
48
+ right: 0;
49
+ padding: 15px;
50
+ opacity: 0.9;
51
+ min-width: 25%;
52
+ max-width: 400px;
53
+ z-index: 5;
54
+ .alert {
55
+ margin-bottom: 5px;
56
+ &:last-child {
57
+ margin-bottom: 0;
58
+ }
59
+ }
60
+ }
61
+
42
62
  #push {
43
63
  height: 40px;
44
64
  }
@@ -78,12 +78,10 @@ input[type="color"],
78
78
  }
79
79
 
80
80
  #search_form {
81
+ margin: 0;
81
82
  .right-label {
82
83
  padding: 5px 0 0 130px;
83
84
  }
84
- #search_cancel {
85
- float: right;
86
- }
87
85
  label {
88
86
  margin-top: 5px;
89
87
  }
@@ -108,27 +106,21 @@ input[type="color"],
108
106
  }
109
107
  input {
110
108
  float: right;
109
+ width: 45%;
111
110
  }
112
111
  }
113
112
  .select select {
114
113
  width: 100%;
115
114
  }
116
- .tooltip.left {
117
- -moz-transform: translateX(-10px) translateY(-4px);
118
- -ms-transform: translateX(-10px) translateY(-4px);
119
- -o-transform: translateX(-10px) translateY(-4px);
120
- -webkit-transform: translateX(-10px) translateY(-4px);
121
- transform: translateX(-10px) translateY(-4px);
122
- }
123
115
  hr {
124
116
  margin: 10px 0;
125
117
  }
126
- .search-submit-wide {
127
- display: block;
128
- width: calc(100% + 26px);
129
- margin-top: -13px;
130
- margin-left: -13px;
131
- margin-right: -13px;
118
+ .search-submit {
119
+ width: 78%;
120
+ }
121
+ .search-cancel {
122
+ width: 20%;
123
+ float: right;
132
124
  }
133
125
  }
134
126
 
@@ -201,6 +193,10 @@ textarea.text {
201
193
  margin-bottom: 1px;
202
194
  }
203
195
 
196
+ .popover-title {
197
+ max-width: 600px;
198
+ }
199
+
204
200
  .auto-submit-checkbox-wrap {
205
201
  display: inline-block;
206
202
  padding: 2px 4px 2px 6px;
@@ -209,7 +205,7 @@ textarea.text {
209
205
  width: auto;
210
206
  margin: 0;
211
207
  line-height: normal;
212
- vertical-align: text-bottom;
208
+ vertical-align: baseline;
213
209
  }
214
210
  label {
215
211
  margin-bottom: 0;