smartkiosk-server 0.11.1 → 0.11.2

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.
@@ -13,7 +13,8 @@ ActiveAdmin.register ProviderReceiptTemplate do
13
13
  #
14
14
  # INDEX
15
15
  #
16
- filter :providers_id, :as => 'multiple_select', :input_html => { :class => 'chosen' }
16
+ filter :providers_id, :as => 'multiple_select', :input_html => { :class => 'chosen' },
17
+ :collection => proc { Provider.rmap }
17
18
  filter :created_at
18
19
  filter :updated_at
19
20
 
@@ -118,6 +118,8 @@ ActiveAdmin.register Terminal do
118
118
  filter :state, :as => 'multiple_select',
119
119
  :collection => proc { I18n.t('smartkiosk.terminal_states').invert },
120
120
  :input_html => { :class => 'chosen' }
121
+ filter :terminal_profile, :as => 'multiple_select', :input_html => { :class => 'chosen' },
122
+ :collection => proc { TerminalProfile.rmap }
121
123
  filter :keyword
122
124
  filter :address
123
125
  filter :ip
@@ -220,6 +222,7 @@ ActiveAdmin.register Terminal do
220
222
 
221
223
  show do |terminal|
222
224
  attributes_table do
225
+ row :terminal_profile
223
226
  row :agent
224
227
  row :keyword
225
228
  row :description
@@ -290,7 +293,6 @@ ActiveAdmin.register Terminal do
290
293
 
291
294
  panel I18n.t('smartkiosk.admin.panels.terminals.juridical') do
292
295
  attributes_table_for terminal do
293
- row :terminal_profile
294
296
  row :sector
295
297
  row :contact_name
296
298
  row :contact_phone
@@ -1,5 +1,16 @@
1
1
  # encoding: utf-8
2
- #= require active_admin/base
2
+ #= require jquery
3
+ #= require jquery-ui
4
+ #= require jquery_ujs
5
+
6
+ #= require active_admin/lib/namespace
7
+ #= require active_admin/components/jquery.aa.checkbox-toggler
8
+ #= require active_admin/components/jquery.aa.dropdown-menu
9
+ #= require active_admin/components/jquery.aa.popover
10
+ #= require active_admin/components/jquery.aa.table-checkbox-toggler
11
+ #= require active_admin/pages/application
12
+ #= require active_admin/pages/batch_actions
13
+
3
14
  #= require chosen.jquery
4
15
  #= require qtip.jquery
5
16
  #= require datepicker-ru.jquery
@@ -0,0 +1,12 @@
1
+ #
2
+ # Active Admin JS
3
+ #
4
+
5
+ $ ->
6
+ # Date picker
7
+ $(".datepicker").datepicker dateFormat: "dd.mm.yy"
8
+ $(".clear_filters_btn").click ->
9
+ window.location.search = ""
10
+ false
11
+
12
+ $(".dropdown_button").popover()
@@ -2,6 +2,7 @@ require 'active_admin/cancan_integration'
2
2
  require 'active_admin/views/pages/base_fix'
3
3
  require 'active_admin/form_builder_fix'
4
4
  require 'active_admin/resource_controller_fix'
5
+ require 'active_admin/inputs/datepicker_input_fix'
5
6
  require 'active_admin/inputs/filter_numeric_range_input'
6
7
  require 'active_admin/inputs/filter_multiple_select_input'
7
8
  require 'active_admin/inputs/filter_date_range_input_fix'
@@ -0,0 +1,14 @@
1
+ module ActiveAdmin
2
+ module Inputs
3
+ class DatepickerInput < ::Formtastic::Inputs::StringInput
4
+ def input_html_options
5
+ options = super
6
+ value = object.send(method)
7
+
8
+ options[:class] = [options[:class], "datepicker"].compact.join(' ')
9
+ options[:value] = value.blank? ? '' : value.strftime("%d.%m.%Y")
10
+ options
11
+ end
12
+ end
13
+ end
14
+ end
@@ -12,12 +12,12 @@ module ActiveAdmin
12
12
  end
13
13
  end
14
14
 
15
- def input_html_options(input_name = gt_input_name, extra_class = '')
15
+ def input_html_options(input_name=gt_input_name, extra_class='')
16
16
  current_value = @object.send(input_name)
17
17
  { :size => 12,
18
18
  :class => "datepicker #{extra_class}",
19
19
  :max => 10,
20
- :value => current_value.respond_to?(:strftime) ? current_value.strftime("%Y-%m-%d") : "" }
20
+ :value => current_value.respond_to?(:strftime) ? current_value.strftime("%d.%m.%Y") : "" }
21
21
  end
22
22
  end
23
23
  end
@@ -57,7 +57,7 @@ class Seeder
57
57
  end
58
58
 
59
59
  def seed_terminal_profiles
60
- TerminalProfile.make!
60
+ TerminalProfile.create! :keyword => 'default', :title => 'Основные'
61
61
  end
62
62
 
63
63
  def seed_test_providers
@@ -1,5 +1,5 @@
1
1
  module Smartkiosk
2
2
  module Server
3
- VERSION = '0.11.1'
3
+ VERSION = '0.11.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartkiosk-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-03-14 00:00:00.000000000 Z
13
+ date: 2013-03-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -98,6 +98,7 @@ files:
98
98
  - app/assets/images/chosen-sprite.png
99
99
  - app/assets/javascripts/active_admin.js.coffee
100
100
  - app/assets/javascripts/active_admin/chosen.js.erb.coffee
101
+ - app/assets/javascripts/active_admin/pages/application.js.coffee
101
102
  - app/assets/javascripts/active_admin/qtip.js.coffee
102
103
  - app/assets/javascripts/active_admin/sortable_forms.js.coffee
103
104
  - app/assets/javascripts/application.js
@@ -269,6 +270,7 @@ files:
269
270
  - init.rb
270
271
  - lib/active_admin/cancan_integration.rb
271
272
  - lib/active_admin/form_builder_fix.rb
273
+ - lib/active_admin/inputs/datepicker_input_fix.rb
272
274
  - lib/active_admin/inputs/filter_date_range_input_fix.rb
273
275
  - lib/active_admin/inputs/filter_multiple_select_input.rb
274
276
  - lib/active_admin/inputs/filter_numeric_range_input.rb
@@ -330,7 +332,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
330
332
  version: '0'
331
333
  segments:
332
334
  - 0
333
- hash: -2694465880755644150
335
+ hash: -1222065104892859917
334
336
  required_rubygems_version: !ruby/object:Gem::Requirement
335
337
  none: false
336
338
  requirements: