solidus_backend 1.0.0.pre2 → 1.0.0.pre3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_backend might be problematic. Click here for more details.

Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spree/backend/gateway.js.coffee +21 -0
  3. data/app/assets/javascripts/spree/backend/shipments.js.erb +6 -2
  4. data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +27 -43
  5. data/app/assets/javascripts/spree/backend.js +0 -1
  6. data/app/assets/stylesheets/spree/backend.css +0 -2
  7. data/app/controllers/spree/admin/base_controller.rb +0 -7
  8. data/app/controllers/spree/admin/orders_controller.rb +8 -1
  9. data/app/controllers/spree/admin/payments_controller.rb +8 -1
  10. data/app/controllers/spree/admin/root_controller.rb +9 -1
  11. data/app/controllers/spree/admin/stock_transfers_controller.rb +25 -4
  12. data/app/controllers/spree/admin/users_controller.rb +4 -1
  13. data/app/views/spree/admin/cancellations/index.html.erb +1 -1
  14. data/app/views/spree/admin/orders/_carton_manifest.html.erb +1 -1
  15. data/app/views/spree/admin/orders/_line_items.html.erb +1 -1
  16. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
  17. data/app/views/spree/admin/orders/cart.html.erb +1 -1
  18. data/app/views/spree/admin/orders/confirm/_shipment_manifest.html.erb +1 -1
  19. data/app/views/spree/admin/orders/customer_details/_form.html.erb +20 -16
  20. data/app/views/spree/admin/orders/edit.html.erb +1 -1
  21. data/app/views/spree/admin/payment_methods/_form.html.erb +17 -8
  22. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +8 -0
  23. data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +21 -0
  24. data/app/views/spree/admin/products/index.html.erb +1 -1
  25. data/app/views/spree/admin/promotion_categories/index.html.erb +11 -5
  26. data/app/views/spree/admin/promotions/index.html.erb +6 -2
  27. data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +7 -0
  28. data/app/views/spree/admin/shared/_head.html.erb +0 -1
  29. data/app/views/spree/admin/shared/_number_field_update_actions.html.erb +5 -3
  30. data/app/views/spree/admin/stock_items/_stock_management.html.erb +1 -1
  31. data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +1 -1
  32. data/app/views/spree/admin/taxonomies/edit.erb +13 -17
  33. data/app/views/spree/admin/users/_form.html.erb +19 -11
  34. data/app/views/spree/admin/users/items.html.erb +1 -1
  35. data/app/views/spree/admin/variants/edit.html.erb +3 -1
  36. data/app/views/spree/admin/variants/index.html.erb +1 -1
  37. data/config/routes.rb +0 -2
  38. data/lib/spree/backend/engine.rb +0 -1
  39. metadata +9 -15
  40. data/app/assets/javascripts/spree/backend/gateway.js +0 -13
  41. data/app/views/spree/admin/payments/_bill_address_form.html.erb +0 -9
  42. data/vendor/assets/images/jquery.alerts/images/help.gif +0 -0
  43. data/vendor/assets/images/jquery.alerts/images/important.gif +0 -0
  44. data/vendor/assets/images/jquery.alerts/images/info.gif +0 -0
  45. data/vendor/assets/images/jquery.alerts/images/title.gif +0 -0
  46. data/vendor/assets/javascripts/jquery.alerts/jquery.alerts.js +0 -235
  47. data/vendor/assets/stylesheets/jquery.alerts/jquery.alerts.css.erb +0 -57
  48. data/vendor/assets/stylesheets/jquery.alerts/jquery.alerts.spree.css +0 -29
@@ -22,7 +22,7 @@
22
22
  <td class="align-center no-padding">
23
23
  <div class='variant-container' data-variant-id="<%= variant.id %>">
24
24
  <div class='variant-image'>
25
- <%= image_tag(variant.display_image.attachment(:small)) %>
25
+ <%= image_tag(variant.display_image(fallback: false).attachment(:small)) %>
26
26
  </div>
27
27
  <div class='variant-details'>
28
28
  <table class='stock-variant-field-table'>
@@ -17,27 +17,23 @@
17
17
  <%= form_for [:admin, @taxonomy] do |f| %>
18
18
  <fieldset class="no-border-top">
19
19
  <%= render :partial => 'form', :locals => { :f => f } %>
20
- <div>
21
- <%= label_tag nil, Spree.t(:tree) %><br />
22
- <script>
23
- Spree.routes.taxonomy_taxons_path = "<%= spree.api_taxonomy_taxons_path(@taxonomy) %>";
24
- Spree.routes.admin_taxonomy_taxons_path = "<%= spree.admin_taxonomy_taxons_path(@taxonomy) %>";
25
- Spree.routes.jstree_theme_path = "<%= stylesheet_path("jquery.jstree/themes/apple/style.css") %>";
26
- </script>
27
- <div id="taxonomy_tree" class="tree"></div>
28
- </div>
29
- <div id="progress" style="display:none;">
30
- <%= image_tag 'select2-spinner.gif', :title => 'Spinner', :style => "vertical-align:bottom;" %> <%= Spree.t(:updating) %>..
31
- </div>
32
-
33
- <div class="info"><%= Spree.t(:taxonomy_tree_instruction) %></div>
34
-
35
- <br>
36
-
37
20
  <div class="filter-actions actions">
38
21
  <%= button Spree.t('actions.update'), 'refresh' %>
39
22
  <span class="or"><%= Spree.t(:or) %></span>
40
23
  <%= button_link_to Spree.t('actions.cancel'), admin_taxonomies_path, :icon => 'remove' %>
41
24
  </div>
42
25
  </fieldset>
26
+
27
+
28
+ <div>
29
+ <%= label_tag nil, Spree.t(:tree) %><br />
30
+ <script>
31
+ Spree.routes.taxonomy_taxons_path = "<%= spree.api_taxonomy_taxons_path(@taxonomy) %>";
32
+ Spree.routes.admin_taxonomy_taxons_path = "<%= spree.admin_taxonomy_taxons_path(@taxonomy) %>";
33
+ Spree.routes.jstree_theme_path = "<%= stylesheet_path("jquery.jstree/themes/apple/style.css") %>";
34
+ </script>
35
+ <div id="taxonomy_tree" class="tree"></div>
36
+
37
+ <div class="info"><%= Spree.t(:taxonomy_tree_instruction) %></div>
38
+ </div>
43
39
  <% end %>
@@ -26,17 +26,25 @@
26
26
  </div>
27
27
  <% end %>
28
28
 
29
- <div data-hook="admin_user_form_stock_locations" class="field">
30
- <%= label_tag nil, Spree.t(:stock_locations) %>
31
- <ul>
32
- <% @stock_locations.each do |stock_location| %>
33
- <li>
34
- <%= check_box_tag 'user[stock_location_ids][]', stock_location.id, @user.stock_locations.include?(stock_location), :id => "user_spree_stock_locations_#{stock_location.name}" %>
35
- <%= label_tag stock_location.name %>
36
- </li>
37
- <% end %>
38
- </ul>
39
- </div>
29
+ <% if can?(:display, Spree::StockLocation) %>
30
+ <div data-hook="admin_user_form_stock_locations" class="field">
31
+ <%= label_tag nil, Spree.t(:stock_locations) %>
32
+ <ul>
33
+ <% if can?(:manage, Spree::UserStockLocation) %>
34
+ <% @stock_locations.each do |stock_location| %>
35
+ <li>
36
+ <%= check_box_tag 'user[stock_location_ids][]', stock_location.id, @user.stock_locations.include?(stock_location), :id => "user_spree_stock_locations_#{stock_location.name}" %>
37
+ <%= label_tag stock_location.name %>
38
+ </li>
39
+ <% end %>
40
+ <% else %>
41
+ <% @stock_locations.select{|sl| @user.stock_locations.include?(sl)}.each do |stock_location| %>
42
+ <%= stock_location.name %>
43
+ <% end %>
44
+ <% end %>
45
+ </ul>
46
+ </div>
47
+ <% end %>
40
48
 
41
49
  </div>
42
50
 
@@ -39,7 +39,7 @@
39
39
  <tr class="stock-item" data-item-quantity="<%= item.quantity %>">
40
40
  <td class="align-center order-completed-at"><%= l(order.completed_at.to_date) if order.completed_at %></td>
41
41
  <td class="item-image">
42
- <%= mini_image(item.variant) %>
42
+ <%= image_tag item.variant.display_image.attachment(:mini) %>
43
43
  </td>
44
44
  <td class="item-name">
45
45
  <%= item.product.name %><br><%= "(" + variant_options(item.variant) + ")" unless item.variant.option_values.empty? %>
@@ -10,6 +10,8 @@
10
10
  <%= render :partial => 'form', :locals => { :f => f } %>
11
11
  </div>
12
12
 
13
- <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
13
+ <% if can?(:update, @variant) %>
14
+ <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
15
+ <% end %>
14
16
  </fieldset>
15
17
  <% end %>
@@ -72,7 +72,7 @@
72
72
  <% if can? :update_positions, Spree::Variant %>
73
73
  <span class="handle"></span>
74
74
  <% end %>
75
- </td>llla
75
+ </td>
76
76
  <td><%= variant.options_text %></td>
77
77
  <td class="align-center"><%= variant.display_price.to_html %></td>
78
78
  <td class="align-center"><%= variant.sku %></td>
data/config/routes.rb CHANGED
@@ -48,8 +48,6 @@ Spree::Core::Engine.add_routes do
48
48
  end
49
49
  get '/products/:product_slug/stock', to: "stock_items#index", as: :product_stock
50
50
 
51
- get '/variants/search', to: "variants#search", as: :search_variants
52
-
53
51
  resources :option_types do
54
52
  collection do
55
53
  post :update_positions
@@ -23,7 +23,6 @@ module Spree
23
23
  jquery.jstree/themes/apple/*
24
24
  fontawesome-webfont*
25
25
  select2_locale*
26
- jquery.alerts/images/*
27
26
  ]
28
27
  end
29
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre2
4
+ version: 1.0.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-20 00:00:00.000000000 Z
11
+ date: 2015-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.pre2
19
+ version: 1.0.0.pre3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0.pre2
26
+ version: 1.0.0.pre3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: solidus_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0.pre2
33
+ version: 1.0.0.pre3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0.pre2
40
+ version: 1.0.0.pre3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bourbon
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -107,7 +107,7 @@ files:
107
107
  - app/assets/javascripts/spree/backend/backbone-overrides.js.coffee
108
108
  - app/assets/javascripts/spree/backend/calculator.js
109
109
  - app/assets/javascripts/spree/backend/checkouts/edit.js
110
- - app/assets/javascripts/spree/backend/gateway.js
110
+ - app/assets/javascripts/spree/backend/gateway.js.coffee
111
111
  - app/assets/javascripts/spree/backend/general_settings.js.coffee
112
112
  - app/assets/javascripts/spree/backend/handlebar_extensions.js
113
113
  - app/assets/javascripts/spree/backend/images/index.js.coffee
@@ -335,7 +335,6 @@ files:
335
335
  - app/views/spree/admin/payment_methods/edit.html.erb
336
336
  - app/views/spree/admin/payment_methods/index.html.erb
337
337
  - app/views/spree/admin/payment_methods/new.html.erb
338
- - app/views/spree/admin/payments/_bill_address_form.html.erb
339
338
  - app/views/spree/admin/payments/_capture_events.html.erb
340
339
  - app/views/spree/admin/payments/_form.html.erb
341
340
  - app/views/spree/admin/payments/_list.html.erb
@@ -347,6 +346,7 @@ files:
347
346
  - app/views/spree/admin/payments/source_forms/_gateway.html.erb
348
347
  - app/views/spree/admin/payments/source_views/_check.html.erb
349
348
  - app/views/spree/admin/payments/source_views/_gateway.html.erb
349
+ - app/views/spree/admin/payments/source_views/_storecredit.html.erb
350
350
  - app/views/spree/admin/product_properties/_product_property_fields.html.erb
351
351
  - app/views/spree/admin/product_properties/index.html.erb
352
352
  - app/views/spree/admin/products/_autocomplete.js.erb
@@ -385,6 +385,7 @@ files:
385
385
  - app/views/spree/admin/promotions/rules/_first_order.html.erb
386
386
  - app/views/spree/admin/promotions/rules/_item_total.html.erb
387
387
  - app/views/spree/admin/promotions/rules/_landing_page.html.erb
388
+ - app/views/spree/admin/promotions/rules/_nth_order.html.erb
388
389
  - app/views/spree/admin/promotions/rules/_one_use_per_user.html.erb
389
390
  - app/views/spree/admin/promotions/rules/_product.html.erb
390
391
  - app/views/spree/admin/promotions/rules/_taxon.html.erb
@@ -578,14 +579,9 @@ files:
578
579
  - vendor/assets/images/jquery-ui/ui-icons_666666_256x240.png
579
580
  - vendor/assets/images/jquery-ui/ui-icons_ff0084_256x240.png
580
581
  - vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png
581
- - vendor/assets/images/jquery.alerts/images/help.gif
582
- - vendor/assets/images/jquery.alerts/images/important.gif
583
- - vendor/assets/images/jquery.alerts/images/info.gif
584
- - vendor/assets/images/jquery.alerts/images/title.gif
585
582
  - vendor/assets/javascripts/backbone.js
586
583
  - vendor/assets/javascripts/equalize.js
587
584
  - vendor/assets/javascripts/handlebars.js
588
- - vendor/assets/javascripts/jquery.alerts/jquery.alerts.js
589
585
  - vendor/assets/javascripts/jquery.cookie.js
590
586
  - vendor/assets/javascripts/jquery.jstree/jquery.jstree.js
591
587
  - vendor/assets/javascripts/jquery.jstree/themes/apple/bg.jpg
@@ -600,8 +596,6 @@ files:
600
596
  - vendor/assets/javascripts/underscore-min.js
601
597
  - vendor/assets/stylesheets/bootstrap/components/_media.scss
602
598
  - vendor/assets/stylesheets/jquery-ui.datepicker.css.erb
603
- - vendor/assets/stylesheets/jquery.alerts/jquery.alerts.css.erb
604
- - vendor/assets/stylesheets/jquery.alerts/jquery.alerts.spree.css
605
599
  - vendor/assets/stylesheets/jquery.powertip.css
606
600
  - vendor/assets/stylesheets/responsive-tables.css
607
601
  - vendor/bundle/bin/bourbon
@@ -1,13 +0,0 @@
1
- $(function() {
2
- var original_gtwy_type = $('#gtwy-type').prop('value');
3
- $('div#gateway-settings-warning').hide();
4
- $('#gtwy-type').change(function() {
5
- if ($('#gtwy-type').prop('value') == original_gtwy_type) {
6
- $('div.gateway-settings').show();
7
- $('div#gateway-settings-warning').hide();
8
- } else {
9
- $('div.gateway-settings').hide();
10
- $('div#gateway-settings-warning').show();
11
- }
12
- });
13
- })
@@ -1,9 +0,0 @@
1
- <% f.fields_for :order do |order_form| %>
2
- <% order_form.fields_for :checkout do |checkout_form| %>
3
-
4
- <% checkout_form.fields_for :bill_address do |ba_form| %>
5
- <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => ba_form, :name => Spree.t(:billing_address) } %>
6
- <% end %>
7
-
8
- <% end %>
9
- <% end %>
@@ -1,235 +0,0 @@
1
- // jQuery Alert Dialogs Plugin
2
- //
3
- // Version 1.1
4
- //
5
- // Cory S.N. LaViska
6
- // A Beautiful Site (http://abeautifulsite.net/)
7
- // 14 May 2009
8
- //
9
- // Visit http://abeautifulsite.net/notebook/87 for more information
10
- //
11
- // Usage:
12
- // jAlert( message, [title, callback] )
13
- // jConfirm( message, [title, callback] )
14
- // jPrompt( message, [value, title, callback] )
15
- //
16
- // History:
17
- //
18
- // 1.00 - Released (29 December 2008)
19
- //
20
- // 1.01 - Fixed bug where unbinding would destroy all resize events
21
- //
22
- // License:
23
- //
24
- // This plugin is dual-licensed under the GNU General Public License and the MIT License and
25
- // is copyright 2008 A Beautiful Site, LLC.
26
- //
27
- (function($) {
28
-
29
- $.alerts = {
30
-
31
- // These properties can be read/written by accessing $.alerts.propertyName from your scripts at any time
32
-
33
- verticalOffset: -75, // vertical offset of the dialog from center screen, in pixels
34
- horizontalOffset: 0, // horizontal offset of the dialog from center screen, in pixels/
35
- repositionOnResize: true, // re-centers the dialog on window resize
36
- overlayOpacity: .01, // transparency level of overlay
37
- overlayColor: '#FFF', // base color of overlay
38
- draggable: true, // make the dialogs draggable (requires UI Draggables plugin)
39
- okButton: '&nbsp;OK&nbsp;', // text for the OK button
40
- cancelButton: '&nbsp;Cancel&nbsp;', // text for the Cancel button
41
- dialogClass: null, // if specified, this class will be applied to all dialogs
42
-
43
- // Public methods
44
-
45
- alert: function(message, title, callback) {
46
- if( title == null ) title = 'Alert';
47
- $.alerts._show(title, message, null, 'alert', function(result) {
48
- if( callback ) callback(result);
49
- });
50
- },
51
-
52
- confirm: function(message, title, callback) {
53
- if( title == null ) title = 'Confirm';
54
- $.alerts._show(title, message, null, 'confirm', function(result) {
55
- if( callback ) callback(result);
56
- });
57
- },
58
-
59
- prompt: function(message, value, title, callback) {
60
- if( title == null ) title = 'Prompt';
61
- $.alerts._show(title, message, value, 'prompt', function(result) {
62
- if( callback ) callback(result);
63
- });
64
- },
65
-
66
- // Private methods
67
-
68
- _show: function(title, msg, value, type, callback) {
69
-
70
- $.alerts._hide();
71
- $.alerts._overlay('show');
72
-
73
- $("BODY").append(
74
- '<div id="popup_container">' +
75
- '<h1 id="popup_title"></h1>' +
76
- '<div id="popup_content">' +
77
- '<div id="popup_message"></div>' +
78
- '</div>' +
79
- '</div>');
80
-
81
- if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass);
82
-
83
- // IE6 Fix
84
- var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed';
85
-
86
- $("#popup_container").css({
87
- position: pos,
88
- zIndex: 99999,
89
- padding: 0,
90
- margin: 0
91
- });
92
-
93
- $("#popup_title").text(title);
94
- $("#popup_content").addClass(type);
95
- $("#popup_message").text(msg);
96
- $("#popup_message").html( $("#popup_message").text().replace(/\n/g, '<br />') );
97
-
98
- $("#popup_container").css({
99
- minWidth: $("#popup_container").outerWidth(),
100
- maxWidth: $("#popup_container").outerWidth()
101
- });
102
-
103
- $.alerts._reposition();
104
- $.alerts._maintainPosition(true);
105
-
106
- switch( type ) {
107
- case 'alert':
108
- $("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /></div>');
109
- $("#popup_ok").click( function() {
110
- $.alerts._hide();
111
- callback(true);
112
- });
113
- $("#popup_ok").focus().keypress( function(e) {
114
- if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click');
115
- });
116
- break;
117
- case 'confirm':
118
- $("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>');
119
- $("#popup_ok").click( function() {
120
- $.alerts._hide();
121
- if( callback ) callback(true);
122
- });
123
- $("#popup_cancel").click( function() {
124
- $.alerts._hide();
125
- if( callback ) callback(false);
126
- });
127
- $("#popup_ok").focus();
128
- $("#popup_ok, #popup_cancel").keypress( function(e) {
129
- if( e.keyCode == 13 ) $("#popup_ok").trigger('click');
130
- if( e.keyCode == 27 ) $("#popup_cancel").trigger('click');
131
- });
132
- break;
133
- case 'prompt':
134
- $("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>');
135
- $("#popup_prompt").width( $("#popup_message").width() );
136
- $("#popup_ok").click( function() {
137
- var val = $("#popup_prompt").val();
138
- $.alerts._hide();
139
- if( callback ) callback( val );
140
- });
141
- $("#popup_cancel").click( function() {
142
- $.alerts._hide();
143
- if( callback ) callback( null );
144
- });
145
- $("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) {
146
- if( e.keyCode == 13 ) $("#popup_ok").trigger('click');
147
- if( e.keyCode == 27 ) $("#popup_cancel").trigger('click');
148
- });
149
- if( value ) $("#popup_prompt").val(value);
150
- $("#popup_prompt").focus().select();
151
- break;
152
- }
153
-
154
- // Make draggable
155
- if( $.alerts.draggable ) {
156
- try {
157
- $("#popup_container").draggable({ handle: $("#popup_title") });
158
- $("#popup_title").css({ cursor: 'move' });
159
- } catch(e) { /* requires jQuery UI draggables */ }
160
- }
161
- },
162
-
163
- _hide: function() {
164
- $("#popup_container").remove();
165
- $.alerts._overlay('hide');
166
- $.alerts._maintainPosition(false);
167
- },
168
-
169
- _overlay: function(status) {
170
- switch( status ) {
171
- case 'show':
172
- $.alerts._overlay('hide');
173
- $("BODY").append('<div id="popup_overlay"></div>');
174
- $("#popup_overlay").css({
175
- position: 'absolute',
176
- zIndex: 99998,
177
- top: '0px',
178
- left: '0px',
179
- width: '100%',
180
- height: $(document).height(),
181
- background: $.alerts.overlayColor,
182
- opacity: $.alerts.overlayOpacity
183
- });
184
- break;
185
- case 'hide':
186
- $("#popup_overlay").remove();
187
- break;
188
- }
189
- },
190
-
191
- _reposition: function() {
192
- var top = (($(window).height() / 2) - ($("#popup_container").outerHeight() / 2)) + $.alerts.verticalOffset;
193
- var left = (($(window).width() / 2) - ($("#popup_container").outerWidth() / 2)) + $.alerts.horizontalOffset;
194
- if( top < 0 ) top = 0;
195
- if( left < 0 ) left = 0;
196
-
197
- // IE6 fix
198
- if( $.browser.msie && parseInt($.browser.version) <= 6 ) top = top + $(window).scrollTop();
199
-
200
- $("#popup_container").css({
201
- top: top + 'px',
202
- left: left + 'px'
203
- });
204
- $("#popup_overlay").height( $(document).height() );
205
- },
206
-
207
- _maintainPosition: function(status) {
208
- if( $.alerts.repositionOnResize ) {
209
- switch(status) {
210
- case true:
211
- $(window).bind('resize', $.alerts._reposition);
212
- break;
213
- case false:
214
- $(window).unbind('resize', $.alerts._reposition);
215
- break;
216
- }
217
- }
218
- }
219
-
220
- }
221
-
222
- // Shortuct functions
223
- jAlert = function(message, title, callback) {
224
- $.alerts.alert(message, title, callback);
225
- }
226
-
227
- jConfirm = function(message, title, callback) {
228
- $.alerts.confirm(message, title, callback);
229
- };
230
-
231
- jPrompt = function(message, value, title, callback) {
232
- $.alerts.prompt(message, value, title, callback);
233
- };
234
-
235
- })(jQuery);
@@ -1,57 +0,0 @@
1
- #popup_container {
2
- font-family: Arial, sans-serif;
3
- font-size: 12px;
4
- min-width: 300px; /* Dialog will be no smaller than this */
5
- max-width: 600px; /* Dialog will wrap after this width */
6
- background: #FFF;
7
- border: solid 5px #999;
8
- color: #000;
9
- -moz-border-radius: 5px;
10
- -webkit-border-radius: 5px;
11
- border-radius: 5px;
12
- }
13
-
14
- #popup_title {
15
- font-size: 14px;
16
- font-weight: bold;
17
- text-align: center;
18
- line-height: 1.75em;
19
- color: #666;
20
- background: #CCC url(<%= asset_path('jquery.alerts/images/title.gif') %>) top repeat-x;
21
- border: solid 1px #FFF;
22
- border-bottom: solid 1px #999;
23
- cursor: default;
24
- padding: 0em;
25
- margin: 0em;
26
- }
27
-
28
- #popup_content {
29
- background: 16px 16px no-repeat url(<%= asset_path('jquery.alerts/images/info.gif') %>);
30
- padding: 1em 1.75em;
31
- margin: 0em;
32
- }
33
-
34
- #popup_content.alert {
35
- background-image: url(<%= asset_path('jquery.alerts/images/info.gif') %>);
36
- }
37
-
38
- #popup_content.confirm {
39
- background-image: url(<%= asset_path('jquery.alerts/images/important.gif') %>);
40
- }
41
-
42
- #popup_content.prompt {
43
- background-image: url(<%= asset_path('jquery.alerts/images/help.gif') %>);
44
- }
45
-
46
- #popup_message {
47
- padding-left: 48px;
48
- }
49
-
50
- #popup_panel {
51
- text-align: center;
52
- margin: 1em 0em 0em 1em;
53
- }
54
-
55
- #popup_prompt {
56
- margin: .5em 0em;
57
- }
@@ -1,29 +0,0 @@
1
- /* Spree Custom dialog styles */
2
- #popup_container.spree {
3
- color: #fff;
4
- background: #005294;
5
- border-color: #113F66;
6
- }
7
-
8
- #popup_container.spree #popup_title {
9
- color: #FFF;
10
- font-weight: normal;
11
- text-align: left;
12
- background: #76A5CC;
13
- border: solid 1px #005294;
14
- padding-left: 1em;
15
- }
16
-
17
- #popup_container.spree #popup_content {
18
- background: none;
19
- }
20
-
21
- #popup_container.spree #popup_message {
22
- padding-left: 0em;
23
- }
24
-
25
- #popup_container.spree input[type='button'] {
26
- border: outset 2px #76A5CC;
27
- color: #fff;
28
- background: #3778AE;
29
- }