active_scaffold_vho 3.1.3 → 3.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active_scaffold_vho}
8
- s.version = "3.1.3"
8
+ s.version = "3.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Many, see README"]
12
- s.date = %q{2012-02-11}
12
+ s.date = %q{2012-05-12}
13
13
  s.description = %q{Save time and headaches, and create a more easily maintainable set of pages, with ActiveScaffold. ActiveScaffold handles all your CRUD (create, read, update, delete) user interface needs, leaving you more time to focus on more challenging (and interesting!) problems.}
14
14
  s.email = %q{activescaffold@googlegroups.com}
15
15
  s.extra_rdoc_files = [
@@ -48,12 +48,14 @@ Gem::Specification.new do |s|
48
48
  "app/assets/javascripts/prototype/rico_corner.js",
49
49
  "app/assets/stylesheets/active_scaffold-ie.css",
50
50
  "app/assets/stylesheets/active_scaffold.css.erb",
51
+ "app/assets/stylesheets/active_scaffold_core.css.erb",
51
52
  "app/assets/stylesheets/jquery-ui-timepicker-addon.css",
52
53
  "frontends/default/views/_action_group.html.erb",
53
54
  "frontends/default/views/_add_existing_form.html.erb",
54
55
  "frontends/default/views/_base_form.html.erb",
55
56
  "frontends/default/views/_create_form.html.erb",
56
57
  "frontends/default/views/_create_form_on_list.html.erb",
58
+ "frontends/default/views/_embedded_controller.html.erb",
57
59
  "frontends/default/views/_field_search.html.erb",
58
60
  "frontends/default/views/_form.html.erb",
59
61
  "frontends/default/views/_form_association.html.erb",
@@ -1,4 +1,16 @@
1
1
  $(document).ready(function() {
2
+ $('form.as_form').live('ajax:before', function(event) {
3
+ var as_form = $(this).closest("form");
4
+ $(this).find('.association-record-new').each(function(index) {
5
+ var record_action = 'empty';
6
+
7
+ if(ActiveScaffold.form_elements_changed($(this).find('input, textarea, select'))) {
8
+ record_action = 'create';
9
+ }
10
+ $(this).find('input.associated_action').val(record_action);
11
+ });
12
+ return true;
13
+ });
2
14
  $('form.as_form').live('ajax:loading', function(event) {
3
15
  var as_form = $(this).closest("form");
4
16
  if (as_form && as_form.attr('data-loading') == 'true') {
@@ -34,6 +46,7 @@ $(document).ready(function() {
34
46
  } else {
35
47
  // hack: jquery requires if you request for javascript that javascript
36
48
  // is coming back, however rails has a different mantra
49
+ // Not needed anymore just included for backwards compatibility with jquery_vho
37
50
  if (action_link.position) {
38
51
  if (parseFloat($.fn.jquery) >= 1.5) {
39
52
  event.data_type = 'text';
@@ -41,12 +54,22 @@ $(document).ready(function() {
41
54
  event.data_type = 'rails';
42
55
  }
43
56
  }
57
+
44
58
  if (action_link.loading_indicator) action_link.loading_indicator.css('visibility','visible');
45
59
  action_link.disable();
46
60
  }
47
61
  }
48
62
  return true;
49
63
  });
64
+ $('a.as_action').live('ajax:beforeSend', function(event, xhr, settings) {
65
+ xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
66
+ var action_link = ActiveScaffold.ActionLink.get($(this));
67
+ if (action_link && action_link.position) {
68
+ settings.dataType = 'text';
69
+ settings.dataTypes = ['text'];
70
+ }
71
+ return true;
72
+ });
50
73
  $('a.as_action').live('ajax:success', function(event, response) {
51
74
  var action_link = ActiveScaffold.ActionLink.get($(this));
52
75
  if (action_link) {
@@ -84,6 +107,7 @@ $(document).ready(function() {
84
107
  var refresh_data = as_cancel.attr('data-refresh');
85
108
  if (refresh_data === 'true' && action_link.refresh_url) {
86
109
  event.data_url = action_link.refresh_url;
110
+ as_cancel.attr('href', action_link.refresh_url);
87
111
  if (action_link.position) event.data_type = 'html'
88
112
  } else if (refresh_data === 'false' || typeof(cancel_url) == 'undefined' || cancel_url.length == 0) {
89
113
  action_link.close();
@@ -92,6 +116,17 @@ $(document).ready(function() {
92
116
  }
93
117
  return true;
94
118
  });
119
+ $('a.as_cancel').live('ajax:beforeSend', function(event, xhr, settings) {
120
+ var as_cancel = $(this);
121
+ var action_link = ActiveScaffold.ActionLink.get($(this));
122
+ var refresh_data = as_cancel.attr('data-refresh');
123
+
124
+ if (action_link && action_link.position && refresh_data === 'true' && action_link.refresh_url) {
125
+ settings.dataType = 'html';
126
+ settings.dataTypes = ['html'];
127
+ }
128
+ return true;
129
+ });
95
130
  $('a.as_cancel').live('ajax:success', function(event, response) {
96
131
  var action_link = ActiveScaffold.find_action_link($(this));
97
132
 
@@ -139,11 +174,25 @@ $(document).ready(function() {
139
174
  $(this).prevAll('img.loading-indicator').css('visibility','hidden');
140
175
  return true;
141
176
  });
142
- $('input[type=button].as_add_existing').live('ajax:before', function(event) {
143
- var url = $(this).attr('href').replace('--ID--', $(this).prev().val());
144
- event.data_url = url;
145
- return true;
177
+ $('a.as_add_existing').live('ajax:before', function(event) {
178
+ var selected_id = $(this).prev().val();
179
+ if (selected_id) {
180
+ var url = $(this).attr('href').replace('--ID--', $(this).prev().val());
181
+ $(this).attr('href', url);
182
+ event.data_url = url;
183
+ return true;
184
+ } else {
185
+ return false;
186
+ }
187
+
146
188
  });
189
+ $('a.as_destroy_existing').live('click', function(event) {
190
+ var associated_record = $(this).closest('tr.association-record');
191
+ ActiveScaffold.delete_subform_record(associated_record);
192
+ event.stopPropagation();
193
+ return false;
194
+ });
195
+
147
196
  $('input.update_form, textarea.update_form, select.update_form').live('change', function(event) {
148
197
  var element = $(this);
149
198
  var as_form = element.closest('form.as_form');
@@ -231,6 +280,24 @@ $(document).ready(function() {
231
280
  ActiveScaffold.focus_first_element_of_form(as_form);
232
281
  return true;
233
282
  });
283
+ $('li.horizontal-sub-form').live('as:form_element_loaded', function(event) {
284
+ $(this).find('a.as_associated_form_link').each(function(index) {
285
+ ActiveScaffold.show($(this));
286
+ //Show select Box for add_existing as well
287
+ if($(this).has('as_add_existing')) {
288
+ ActiveScaffold.show($(this).prev());
289
+ }
290
+ })
291
+ return true;
292
+ });
293
+ $('li.sub-form').live('as:form_element_loaded', function(event) {
294
+ $(this).find('.association-record-new').each(function(index) {
295
+ $(this).find('input, textarea, select').each(function(index) {
296
+ $(this).data('value_was', $(this).val());
297
+ })
298
+ })
299
+ return true;
300
+ });
234
301
  $('span.mark_heading, span.in_place_editor_field[data-ie_mode="inline_checkbox"]').live('click', function(event) {
235
302
  ActiveScaffold.process_checkbox_inplace_edit($(this).find('input:checkbox'), ActiveScaffold.inplace_edit_options($(this)));
236
303
  return true;
@@ -242,12 +309,20 @@ $(document).ready(function() {
242
309
  return true;
243
310
  });
244
311
  $('tr.inline-adapter-autoopen').live('as:list_row_loaded', function(event) {
245
- var actionlink_id = $(event.target).attr('data-actionlinkid');
246
- if(actionlink_id) {
247
- var action_link = ActiveScaffold.ActionLink.get(actionlink_id);
248
- if (action_link) {
249
- action_link.set_opened();
250
- }
312
+ var actionlink_controllers = $(event.target).attr('data-actionlink-controllers');
313
+ if(actionlink_controllers) {
314
+ actionlink_controllers = actionlink_controllers.split('::');
315
+ $(this).prev('tr').find('a.index').each(function(index) {
316
+ var action_link = $(this);
317
+ for (var i = 0; i < actionlink_controllers.length; i++) {
318
+ if (actionlink_controllers[i] === action_link.attr('data-controller')) {
319
+ var as_action_link = ActiveScaffold.ActionLink.get(action_link);
320
+ if (as_action_link) {
321
+ as_action_link.set_opened();
322
+ }
323
+ }
324
+ }
325
+ });
251
326
  }
252
327
  return true;
253
328
  });
@@ -262,6 +337,7 @@ $(document).ready(function() {
262
337
  return true;
263
338
  });
264
339
  ActiveScaffold.trigger_load_events($('[data-as_load]'));
340
+ ActiveScaffold.load_embedded_conrollers();
265
341
 
266
342
  });
267
343
 
@@ -582,7 +658,8 @@ var ActiveScaffold = {
582
658
  if (errors.hasClass('association-record-errors')) {
583
659
  this.replace_html(errors, '');
584
660
  }
585
- this.remove(record);
661
+ record.find('input.associated_action').val('delete');
662
+ this.hide(record);
586
663
  },
587
664
 
588
665
  report_500_response: function(active_scaffold_id) {
@@ -748,7 +825,15 @@ var ActiveScaffold = {
748
825
  hover_class: 'hover',
749
826
  element_id: 'editor_id',
750
827
  ajax_data_type: "script",
751
- update_value: 'value'},
828
+ update_value: 'value',
829
+ delegate: {didOpenEditInPlace: function(aDOMNode, aSettingsDict) {
830
+ ActiveScaffold.trigger_load_events(aDOMNode.find('[data-as_load]'));
831
+ return true;
832
+ },
833
+ shouldCloseEditInPlace: function(aDOMNode, aSettingsDict) {
834
+ ActiveScaffold.trigger_unload_events(aDOMNode.find('[data-as_load]'));
835
+ return true;
836
+ }}},
752
837
  csrf_param = $('meta[name=csrf-param]').first(),
753
838
  csrf_token = $('meta[name=csrf-token]').first(),
754
839
  my_parent = span.parent(),
@@ -835,6 +920,27 @@ var ActiveScaffold = {
835
920
  break;
836
921
  }
837
922
  });
923
+ },
924
+
925
+ load_embedded_conrollers: function(){
926
+ $.each($('a.as_link_to_component'), function(index) {
927
+ var div_element = $(this).closest('div.active-scaffold-component');
928
+ div_element.load($(this).attr('href').append_params({embedded: true}));
929
+ });
930
+ },
931
+
932
+ form_elements_changed: function(form_elements){
933
+ var form_elements_count = form_elements.length;
934
+ var i = 0;
935
+ var changed = false;
936
+
937
+ while(changed === false && i < form_elements_count) {
938
+ if($(form_elements[i]).val() != $(form_elements[i]).data('value_was')) {
939
+ changed = true;
940
+ }
941
+ i++;
942
+ }
943
+ return changed;
838
944
  }
839
945
  }
840
946
 
@@ -2,24 +2,38 @@
2
2
  <%= ActiveScaffold::Bridges::DatePickerBridge.localization %>
3
3
 
4
4
  $(document).ready(function() {
5
- $('input.date_picker').live('focus', function(event) {
6
- var date_picker = $(this);
7
- if (typeof(date_picker.datepicker) == 'function') {
8
- if (!date_picker.hasClass('hasDatepicker')) {
5
+ $('form.as_form, form.inplace_form').live('as:form_loaded', function(event) {
6
+ var as_form = $(this).closest("form");
7
+ as_form.find('input.datetime_picker').each(function(index) {
8
+ var date_picker = $(this);
9
+ if (typeof(date_picker.datetimepicker) == 'function') {
10
+ date_picker.datetimepicker();
11
+ }
12
+ });
13
+
14
+ as_form.find('input.date_picker').each(function(index) {
15
+ var date_picker = $(this);
16
+ if (typeof(date_picker.datepicker) == 'function') {
9
17
  date_picker.datepicker();
10
- date_picker.trigger('focus');
11
18
  }
12
- }
19
+ });
13
20
  return true;
14
21
  });
15
- $('input.datetime_picker').live('focus', function(event) {
16
- var date_picker = $(this);
17
- if (typeof(date_picker.datetimepicker) == 'function') {
18
- if (!date_picker.hasClass('hasDatepicker')) {
19
- date_picker.datetimepicker();
20
- date_picker.trigger('focus');
22
+ $('form.as_form, form.inplace_form').live('as:form_unloaded', function(event) {
23
+ var as_form = $(this).closest("form");
24
+ as_form.find('input.datetime_picker').each(function(index) {
25
+ var date_picker = $(this);
26
+ if (typeof(date_picker.datetimepicker) == 'function') {
27
+ date_picker.datetimepicker('destroy');
28
+ }
29
+ });
30
+
31
+ as_form.find('input.date_picker').each(function(index) {
32
+ var date_picker = $(this);
33
+ if (typeof(date_picker.datepicker) == 'function') {
34
+ date_picker.datepicker('destroy');
21
35
  }
22
- }
36
+ });
23
37
  return true;
24
38
  });
25
39
  });
@@ -259,7 +259,7 @@ $.extend(InlineEditor.prototype, {
259
259
  var buttons_html = (this.settings.show_buttons) ? this.settings.save_button + ' ' + this.settings.cancel_button : '';
260
260
  var editorElement = this.createEditorElement(); // needs to happen before anything is replaced
261
261
  /* insert the new in place form after the element they click, then empty out the original element */
262
- this.dom.html('<form class="inplace_form" style="display: inline; margin: 0; padding: 0;"></form>')
262
+ this.dom.html('<form class="inplace_form" data-as_load="form" style="display: inline; margin: 0; padding: 0;"></form>')
263
263
  .find('form')
264
264
  .append(editorElement)
265
265
  .append(buttons_html);
@@ -1,11 +1,11 @@
1
- $('form.as_form').live('as:form_loaded', function(event) {
1
+ $('form.as_form, form.inplace_form').live('as:form_loaded', function(event) {
2
2
  var as_form = $(this).closest("form");
3
3
  as_form.find('textarea.as_mceEditor').each(function(index, elem) {
4
4
  tinyMCE.execCommand('mceAddControl', false, $(elem).attr('id'));
5
5
  });
6
6
  return true;
7
7
  });
8
- $('form.as_form').live('as:form_submit', function(event) {
8
+ $('form.as_form, form.inplace_form').live('as:form_submit', function(event) {
9
9
  var as_form = $(this).closest("form");
10
10
  if (as_form.has('textarea.as_mceEditor').length > 0) {
11
11
  tinyMCE.triggerSave();
@@ -13,7 +13,7 @@ $('form.as_form').live('as:form_submit', function(event) {
13
13
  return true;
14
14
  });
15
15
 
16
- $('form.as_form').live('as:form_unloaded', function(event) {
16
+ $('form.as_form, form.inplace_form').live('as:form_unloaded', function(event) {
17
17
  var as_form = $(this).closest("form");
18
18
  as_form.find('textarea.as_mceEditor').each(function(index, elem) {
19
19
  tinyMCE.execCommand('mceRemoveControl', false, $(elem).attr('id'));
@@ -315,12 +315,19 @@ document.observe("dom:loaded", function() {
315
315
  return true;
316
316
  });
317
317
  document.on('as:list_row_loaded', 'tr.inline-adapter-autoopen', function(event, element) {
318
- var actionlink_id = element.readAttribute('data-actionlinkid');
319
- if(actionlink_id) {
320
- var action_link = ActiveScaffold.ActionLink.get(actionlink_id);
321
- if (action_link) {
322
- action_link.set_opened();
323
- }
318
+ var actionlink_controllers = event.element().readAttribute('data-actionlink-controllers');
319
+ if(actionlink_controllers) {
320
+ actionlink_controllers = actionlink_controllers.split('::');
321
+ element.previous('tr').select('a.index').each(function(action_link) {
322
+ for (var i = 0; i < actionlink_controllers.length; i++) {
323
+ if (actionlink_controllers[i] === action_link.readAttribute('data-controller')) {
324
+ var as_action_link = ActiveScaffold.ActionLink.get(action_link);
325
+ if (as_action_link) {
326
+ as_action_link.set_opened();
327
+ }
328
+ }
329
+ }
330
+ });
324
331
  }
325
332
  return true;
326
333
  });
@@ -1,1077 +1,4 @@
1
- /*
2
- ActiveScaffold
3
- (c) 2007 Richard White <rrwhite@gmail.com>
4
-
5
- ActiveScaffold is freely distributable under the terms of an MIT-style license.
6
-
7
- For details, see the ActiveScaffold web site: http://www.activescaffold.com/
8
- */
9
-
10
- .active-scaffold form,
11
- .active-scaffold table,
12
- .active-scaffold p,
13
- .active-scaffold div,
14
- .active-scaffold fieldset {
15
- margin: 0;
16
- padding: 0;
17
- }
18
-
19
- .active-scaffold {
20
- margin: 5px 0;
21
- }
22
-
23
- .active-scaffold table {
24
- width: 100%;
25
- border-collapse: separate;
26
- }
27
-
28
- .active-scaffold a,
29
- .active-scaffold a:visited {
30
- color: #06c;
31
- text-decoration: none;
32
- }
33
-
34
- .active-scaffold a.disabled {
35
- color: #999;
36
- }
37
-
38
- .active-scaffold a:hover, .active-scaffold div.hover, .active-scaffold td span.hover {
39
- background-color: #ff8;
40
- }
41
-
42
- .active-scaffold div.actions a img,
43
- .active-scaffold td.actions a img {
44
- border: none;
45
- vertical-align: middle;
46
- }
47
-
48
- .active-scaffold div.actions a.disabled img,
49
- .active-scaffold td.actions a.disabled img {
50
- opacity: 0.5;
51
- }
52
-
53
- .active-scaffold .clear-fix {
54
- clear: both;
55
- }
56
-
57
- noscript.active-scaffold {
58
- border-left: solid 5px #f66;
59
- background-color: #fbb;
60
- font-size: 11px;
61
- font-weight: bold;
62
- padding: 5px 20px 5px 5px;
63
- color: #333;
64
- }
65
-
66
- /* Header
67
- ======================== */
68
-
69
- .active-scaffold-header {
70
- position: relative;
71
- }
72
-
73
- .blue-theme .active-scaffold-header {
74
- background-color: #005CB8;
75
- }
76
-
77
- .active-scaffold-header h2 {
78
- padding: 2px 0px;
79
- margin: 0;
80
- color: #555;
81
- font: bold 160% arial, sans-serif;
82
- }
83
-
84
- .blue-theme .active-scaffold-header h2 {
85
- color: #fff;
86
- padding: 2px 5px 4px 5px;
87
- }
88
-
89
- .active-scaffold-header div.actions a,
90
- .active-scaffold-header div.actions {
91
- float: right;
92
- font: bold 14px arial;
93
- letter-spacing: -1px;
94
- text-decoration: none;
95
- padding: 1px 2px;
96
- white-space: nowrap;
97
- margin-left: 5px;
98
- background-position: 1px 50%;
99
- background-repeat: no-repeat;
100
- }
101
-
102
- .active-scaffold-header div.actions a {
103
- padding: 5px 5px;
104
- margin-left: 0px;
105
- }
106
-
107
- .active-scaffold .active-scaffold .active-scaffold-header div.actions > a {
108
- padding: 1px 5px;
109
- }
110
-
111
- .active-scaffold-header div.actions div.action_group {
112
- display: inline;
113
- float: right;
114
- }
115
-
116
- .active-scaffold-header div.actions div.action_group li a,
117
- .active-scaffold-header div.actions div.action_group li div {
118
- float: none;
119
- margin: 0;
120
- }
121
-
122
- .active-scaffold-header div.actions .action_group ul {
123
- line-height: 130%;
124
- top: 19px;
125
- }
126
-
127
- .active-scaffold .active-scaffold .active-scaffold-header div.actions .action_group ul {
128
- top: 14px;
129
- }
130
-
131
- .view .active-scaffold-header div.actions a,
132
- .view .active-scaffold-header div.actions div,
133
- .view .active-scaffold-header div.actions div.action_group {
134
- float: left;
135
- }
136
-
137
- .blue-theme .active-scaffold-header div.actions a {
138
- color: #fff;
139
- }
140
-
141
- .active-scaffold-header div.actions a.disabled {
142
- color: #666;
143
- opacity: 0.5;
144
- }
145
-
146
- .blue-theme .active-scaffold-header div.actions a.disabled {
147
- color: #fff;
148
- opacity: 0.5;
149
- }
150
-
151
- .active-scaffold-header div.actions a.new,
152
- .active-scaffold-header div.actions a.new_existing,
153
- .active-scaffold-header div.actions a.show_search,
154
- .active-scaffold-header div.actions a.show_config_list,
155
- .active-scaffold-header div.actions div.action_group div {
156
- margin:0;
157
- padding: 5px 5px 5px 25px;
158
- background-position: 5px 50%;
159
- background-repeat: no-repeat;
160
- }
161
-
162
- .active-scaffold .active-scaffold .active-scaffold-header div.actions > a.new,
163
- .active-scaffold .active-scaffold .active-scaffold-header div.actions > a.new_existing,
164
- .active-scaffold .active-scaffold .active-scaffold-header div.actions > a.show_search,
165
- .active-scaffold .active-scaffold .active-scaffold-header div.actions > a.show_config_list,
166
- .active-scaffold .active-scaffold .active-scaffold-header div.actions div.action_group > div {
167
- margin:0;
168
- padding: 1px 5px 1px 20px;
169
- background-position: 1px 50%;
170
- background-repeat: no-repeat;
171
- }
172
-
173
- .active-scaffold-header div.actions div.action_group div {
174
- background-image: url(<%= asset_data_uri 'gears.png' %>); /* default icon for actions or override with css */
175
- }
176
-
177
- .active-scaffold-header div.actions a.show_config_list {
178
- background-image: url(<%= asset_data_uri 'config.png' %>);
179
- }
180
-
181
- .active-scaffold-header div.actions a.new,
182
- .active-scaffold-header div.actions a.new_existing {
183
- background-image: url(<%= asset_data_uri 'add.gif' %>);
184
- }
185
-
186
- .active-scaffold-header div.actions a.show_search {
187
-
188
- background-image: url(<%= asset_data_uri 'magnifier.png' %>);
189
- }
190
-
191
- .blue-theme .active-scaffold-header div.actions a:hover {
192
- background-color: #378CDF;
193
- }
194
-
195
- .active-scaffold-header div.actions a.disabled:hover {
196
- background-color: transparent;
197
- cursor: default;
198
- }
199
-
200
- .active-scaffold-header div.actions {
201
- position: absolute;
202
- right: 5px;
203
- top: 5px;
204
- text-align: right;
205
- }
206
-
207
- /* Table :: Column Headers
208
- ============================= */
209
-
210
- .active-scaffold th {
211
- background-color: #555;
212
- text-align: left;
213
- }
214
-
215
- .active-scaffold th a,
216
- .active-scaffold th p {
217
- font: bold 11px arial, sans-serif;
218
- display: block;
219
- background-color: #555;
220
- }
221
-
222
- .active-scaffold th a, .active-scaffold th a:visited {
223
- color: #fff;
224
- padding: 2px 2px 2px 5px;
225
- }
226
-
227
- .active-scaffold th p {
228
- color: #eee;
229
- padding: 2px 5px;
230
- }
231
-
232
- .active-scaffold th a:hover {
233
- background-color: #000;
234
- color: #ff8;
235
- }
236
-
237
- .active-scaffold th.sorted {
238
- background-color: #333;
239
- }
240
-
241
- .active-scaffold th.sorted a {
242
- padding-right: 18px;
243
- }
244
-
245
- .active-scaffold th.asc a,
246
- .active-scaffold th.asc a:hover {
247
- background: #333 url(<%= asset_data_uri 'arrow_up.gif' %>) right 50% no-repeat;
248
- }
249
-
250
- .active-scaffold th.desc a,
251
- .active-scaffold th.desc a:hover {
252
- background: #333 url(<%= asset_data_uri 'arrow_down.gif' %>) right 50% no-repeat;
253
- }
254
-
255
- .active-scaffold th.loading a,
256
- .active-scaffold th.loading a:hover {
257
- background: #333 url(<%= asset_data_uri 'indicator-small.gif' %>) right 50% no-repeat;
258
- }
259
-
260
- .active-scaffold th .mark_heading {
261
- margin-left: 5px;
262
- }
263
-
264
- /* Table :: Record Rows
265
- ============================= */
266
-
267
- .active-scaffold tr.record {
268
- background-color: #E6F2FF;
269
- }
270
- .active-scaffold tr.record td {
271
- padding: 5px 4px;
272
- color: #333;
273
- font-family: Verdana, sans-serif;
274
- font-size: 11px;
275
- border-bottom: solid 1px #C5DBF7;
276
- border-left: solid 1px #C5DBF7;
277
- }
278
-
279
- .active-scaffold tr.record td.messages-container {
280
- padding: 0px;
281
- }
282
-
283
- .active-scaffold tr.even-record {
284
- background-color: #fff;
285
- }
286
- .active-scaffold tr.even-record td {
287
- border-left-color: #ddd;
288
- }
289
-
290
- .active-scaffold tr.record td.sorted {
291
- background-color: #B9DCFF;
292
- border-bottom-color: #AFD0F5;
293
- }
294
-
295
- .active-scaffold tr.even-record td.sorted {
296
- background-color: #E6F2FF;
297
- border-bottom-color: #AFD0F5;
298
- }
299
-
300
- .active-scaffold tbody.records td.empty {
301
- color: #999;
302
- text-align: center;
303
- }
304
-
305
- .active-scaffold td.numeric,
306
- .active-scaffold-calculations td {
307
- text-align: right;
308
- }
309
-
310
- /* Table :: Actions (Edit, Delete)
311
- ============================= */
312
- .active-scaffold tr.record td.actions {
313
- border-right: solid 1px #ccc;
314
- padding: 0;
315
- min-width: 1%;
316
- }
317
-
318
- .active-scaffold tr.record td.actions table {
319
- float: right;
320
- width: auto;
321
- margin-right: 5px;
322
- }
323
-
324
- .active-scaffold tr.record td.actions table td {
325
- border: none;
326
- text-align: right;
327
- padding: 0 2px;
328
- }
329
-
330
- .active-scaffold tr.record td.actions a,
331
- .active-scaffold tr.record td.actions div {
332
- font: bold 11px verdana, sans-serif;
333
- letter-spacing: -1px;
334
- padding: 2px;
335
- margin: 0 2px;
336
- line-height: 16px;
337
- white-space: nowrap;
338
- }
339
-
340
- .active-scaffold tr.record td.actions a.disabled {
341
- color: #666;
342
- opacity: 0.5;
343
- }
344
-
345
- .active-scaffold .actions .action_group div:hover {
346
- background-color: #ff8;
347
- }
348
-
349
- .active-scaffold .actions .action_group {
350
- position: relative;
351
- text-align: left;
352
- color: #0066CC;
353
- }
354
-
355
- .active-scaffold .actions .action_group ul {
356
- border: 2px solid #005CB8;
357
- list-style-type: none;
358
- margin: 0;
359
- padding: 0;
360
- position: absolute;
361
- line-height: 200%;
362
- display: none;
363
- width: 150px;
364
- right: 0px;
365
- }
366
-
367
- .active-scaffold .actions .action_group ul ul {
368
- display: none;
369
- position: absolute;
370
- top: 0;
371
- right: 150px;
372
- }
373
-
374
- .active-scaffold .actions .action_group ul li {
375
- background: none repeat scroll 0 0 #EEE;
376
- border-top: 1px dashed #222;
377
- display: block;
378
- position: relative;
379
- width: auto;
380
- z-index: 2;
381
- }
382
-
383
- .active-scaffold .actions .action_group ul li div {
384
- margin: 0;
385
- padding: 5px 5px 5px 25px;
386
- background-position: 5px 50%;
387
- background-repeat: no-repeat;
388
- }
389
-
390
- .active-scaffold .actions .action_group ul li a {
391
- display: block;
392
- color: #333;
393
- margin: 0;
394
- padding: 5px 5px 5px 25px;
395
- background-position: 5px 50%;
396
- background-repeat: no-repeat;
397
- }
398
-
399
- .active-scaffold .actions .action_group ul li.top {
400
- border-top: 0px solid #005CB8;
401
- }
402
-
403
- .active-scaffold .actions .action_group:hover ul ul,
404
- .active-scaffold .actions .action_group:hover ul ul ul {
405
- display: none;
406
- }
407
-
408
- .active-scaffold .actions .action_group:hover ul,
409
- .active-scaffold .actions .action_group ul li:hover > ul,
410
- .active-scaffold .actions .action_group ul ul li:hover ul {
411
- display: block;
412
- }
413
-
414
- /* Table :: Inline Adapter
415
- ============================= */
416
-
417
- .active-scaffold .view {
418
- background-color: #DAFFCD;
419
- padding: 4px;
420
- border: solid 1px #7FcF00;
421
- }
422
-
423
- .active-scaffold tbody.records td.inline-adapter-cell .view {
424
- border-top: none;
425
- }
426
-
427
- .active-scaffold .before-header td.inline-adapter-cell .view {
428
- border-bottom: none;
429
- }
430
-
431
- .active-scaffold a.inline-adapter-close {
432
- float: right;
433
- text-indent: -4000px;
434
- width: 16px;
435
- height: 17px;
436
- background: url(<%= asset_data_uri 'close.gif' %>) 0 0 no-repeat;
437
- }
438
-
439
- /* Nested
440
- ======================== */
441
-
442
- .blue-theme .active-scaffold .active-scaffold-header,
443
- .blue-theme .active-scaffold .active-scaffold-footer {
444
- background-color: #1F7F00;
445
-
446
- background: transparent;
447
- }
448
-
449
- .active-scaffold .active-scaffold .active-scaffold-header {
450
- margin-right: 15px;
451
- }
452
-
453
- .active-scaffold .active-scaffold .active-scaffold-header h2 {
454
- font-size: 12px;
455
- font-weight: bold;
456
- }
457
-
458
- .blue-theme .active-scaffold .active-scaffold-header h2,
459
- .active-scaffold .active-scaffold .active-scaffold-footer {
460
- color: #444;
461
- }
462
-
463
- .active-scaffold .active-scaffold .active-scaffold-header div.actions {
464
- top: 0px;
465
- right: 0px;
466
- }
467
-
468
- .active-scaffold .active-scaffold .active-scaffold-header div.actions a,
469
- .active-scaffold .active-scaffold .active-scaffold-header div.actions div {
470
- font: bold 11px verdana, sans-serif;
471
- }
472
-
473
- .blue-theme .active-scaffold .active-scaffold-header div.actions a,
474
- .blue-theme .active-scaffold .active-scaffold-header div.actions a:visited {
475
- color: #06c;
476
- }
477
-
478
- .blue-theme .active-scaffold .active-scaffold-header div.actions a:hover {
479
- background-color: #ff8;
480
- }
481
-
482
- .active-scaffold .active-scaffold .view {
483
- background-color: transparent;
484
- padding: 0px;
485
- border: none;
486
- }
487
-
488
- .active-scaffold .active-scaffold td {
489
- background-color: #ECFFE7;
490
- border-bottom: solid 1px #CDF7C5;
491
- border-left: solid 1px #CDF7C5;
492
- }
493
-
494
- .active-scaffold .active-scaffold td.inline-adapter-cell {
495
- background-color: #FFFFBB;
496
- padding: 4px;
497
- border: solid 1px #DDDF37;
498
- border-top: none;
499
- }
500
-
501
- .active-scaffold .active-scaffold .active-scaffold td.inline-adapter-cell {
502
- background-color: #DAFFCD;
503
- padding: 4px;
504
- border: solid 1px #7FcF00;
505
- border-top: none;
506
- }
507
-
508
- .active-scaffold .active-scaffold .active-scaffold-footer {
509
- font-size: 11px;
510
- }
511
-
512
- /* Footer
513
- ========================== */
514
-
515
- .active-scaffold-calculations td {
516
- background-color: #eee;
517
- border-top: 2px solid #005CB8;
518
- font: bold 12px arial, sans-serif;
519
- }
520
-
521
- .active-scaffold .active-scaffold-footer {
522
- padding: 3px 0px 2px 0px;
523
- border-bottom: none;
524
- font: bold 12px arial, sans-serif;
525
- }
526
-
527
- .blue-theme .active-scaffold-footer {
528
- background-color: #005CB8;
529
- color: #ccc;
530
- }
531
-
532
- .active-scaffold-footer .active-scaffold-pagination {
533
- float: right;
534
- white-space: nowrap;
535
- margin-right: 5px;
536
- }
537
-
538
- .blue-theme .active-scaffold-footer .active-scaffold-records {
539
- margin-left: 5px;
540
- }
541
-
542
- .active-scaffold-footer a {
543
- text-decoration: none;
544
- letter-spacing: 0;
545
- padding: 0 2px;
546
- margin: 0 -2px;
547
- font: bold 12px arial, sans-serif;
548
- }
549
-
550
- .blue-theme .active-scaffold-footer a,
551
- .blue-theme .active-scaffold-footer a:visited {
552
- color: #fff;
553
- }
554
-
555
- .blue-theme .active-scaffold-footer a:hover {
556
- background-color: #378CDF;
557
- }
558
-
559
- .active-scaffold-footer .next {
560
- margin-left: 0;
561
- padding-left: 5px;
562
- border-left: solid 1px #ccc;
563
- }
564
-
565
- .active-scaffold-footer .previous {
566
- margin-right: 0;
567
- padding-right: 5px;
568
- border-right: solid 1px #ccc;
569
- }
570
-
571
- /* Messages
572
- ========================= */
573
-
574
- .active-scaffold .messages-container,
575
- .active-scaffold .active-scaffold .messages-container{
576
- padding: 0;
577
- margin: 0 7px;
578
- border: none;
579
- }
580
-
581
- .active-scaffold .empty-message, .active-scaffold .filtered-message {
582
- background-color: #e8e8e8;
583
- padding: 4px;
584
- text-align: center;
585
- color: #666;
586
- }
587
-
588
- .active-scaffold .message {
589
- font-size: 11px;
590
- font-weight: bold;
591
- padding: 5px 20px 5px 5px;
592
- color: #333;
593
- position: relative;
594
- margin: 2px 7px;
595
- line-height: 12px;
596
- }
597
-
598
- .active-scaffold .message a {
599
- position: absolute;
600
- right: 10px;
601
- top: 4px;
602
- padding: 0;
603
- font: bold 11px verdana, sans-serif;
604
- letter-spacing: -1px;
605
- }
606
-
607
- .active-scaffold .messages-container .message {
608
- margin: 0;
609
- }
610
-
611
- .active-scaffold .error-message {
612
- border-left: solid 5px #f66;
613
- background-color: #fbb;
614
- }
615
-
616
- .active-scaffold .warning-message {
617
- border-left: solid 5px #ff6;
618
- background-color: #ffb;
619
- }
620
-
621
- .active-scaffold .info-message {
622
- border-left: solid 5px #66f;
623
- background-color: #bbf;
624
- }
625
-
626
- /* Error Styling
627
- ========================== */
628
-
629
- .active-scaffold .errorExplanation {
630
- background-color: #fcc;
631
- margin: 2px 0;
632
- border: solid 1px #f66;
633
- }
634
-
635
- .active-scaffold fieldset {
636
- clear: both;
637
- }
638
-
639
- .active-scaffold .errorExplanation h2 {
640
- padding: 2px 5px;
641
- color: #333;
642
- font-size: 11px;
643
- margin: 0;
644
- letter-spacing: 0;
645
- font-family: Verdana;
646
- background-color: #f66;
647
- }
648
-
649
- .active-scaffold .errorExplanation ul {
650
- margin: 0;
651
- padding: 0 2px 4px 25px;
652
- list-style: disc;
653
- }
654
-
655
- .active-scaffold .errorExplanation p {
656
- font-size: 11px;
657
- padding: 2px 5px;
658
- font-family: Verdana;
659
- margin: 0;
660
- }
661
-
662
- .active-scaffold .errorExplanation ul li {
663
- font: bold 11px verdana;
664
- letter-spacing: -1px;
665
- margin: 0;
666
- padding: 0;
667
- background-color: transparent;
668
- }
669
-
670
- /* Loading Indicators
671
- ============================== */
672
-
673
- .active-scaffold .loading-indicator {
674
- vertical-align: text-bottom;
675
- width: 16px;
676
- margin: 0;
677
- }
678
-
679
- .active-scaffold .active-scaffold-header .loading-indicator {
680
- margin-bottom: 3px;
681
- }
682
-
683
- /* Show
684
- ============================= */
685
-
686
- .active-scaffold .show-view dl {
687
- margin-left: 5px;
688
- }
689
-
690
- .active-scaffold .show-view dt {
691
- width: 12em;
692
- float: left;
693
- clear: left;
694
- font: normal 11px verdana, sans-serif;
695
- color: #555;
696
- line-height: 16px;
697
- }
698
-
699
- .active-scaffold .show-view dd {
700
- float: left;
701
- font: bold 14px arial;
702
- padding-left: 5px;
703
- margin-bottom: 5px;
704
- }
705
-
706
- /* Form
707
- ============================== */
708
-
709
- .active-scaffold .submit {
710
- font-weight: bold;
711
- font-size: 14px;
712
- font-family: Arial, sans-serif;
713
- letter-spacing: 0;
714
- margin: 0;
715
- margin-top: 5px;
716
- }
717
-
718
- .active-scaffold form p {
719
- clear: both;
720
- }
721
-
722
- .active-scaffold fieldset {
723
- border: none;
724
- }
725
-
726
- .active-scaffold h4,
727
- .active-scaffold h5 {
728
- padding: 2px;
729
- margin: 0;
730
- text-transform: none;
731
- color: #1F7F00;
732
- letter-spacing: -1px;
733
- font: bold 16px arial;
734
- }
735
-
736
- .active-scaffold h5 {
737
- padding: 0;
738
- margin: 5px 0 2px 0;
739
- font-size: 14px;
740
- letter-spacing: 0;
741
- }
742
-
743
- .active-scaffold ol {
744
- clear: both;
745
- float: none;
746
- padding: 2px;
747
- margin-left: 5px;
748
- list-style: none;
749
- }
750
-
751
- .active-scaffold p.form-footer {
752
- clear: both;
753
- }
754
-
755
- .active-scaffold a.as_cancel,
756
- .active-scaffold p.form-footer a {
757
- font: bold 14px arial, sans-serif;
758
- letter-spacing: 0;
759
- }
760
-
761
- /* Form :: Fields
762
- ============================== */
763
-
764
- .active-scaffold li.form-element {
765
- clear: both;
766
- }
767
-
768
- .active-scaffold label {
769
- font: normal 11px verdana, sans-serif;
770
- color: #555;
771
- }
772
-
773
- .active-scaffold li.form-element dt {
774
- float: left;
775
- width: 12em;
776
- padding: 6px 0;
777
- }
778
-
779
- .active-scaffold li.form-element dd {
780
- float: left;
781
- }
782
-
783
- .active-scaffold li.form-element dd input[type="checkbox"] {
784
- margin-top: 6px;
785
- }
786
-
787
- .active-scaffold .form dd {
788
- margin: 0;
789
- }
790
-
791
-
792
- .active-scaffold .description {
793
- display: inline-block;
794
- color: #999;
795
- font-size: 10px;
796
- margin-left: 5px;
797
- }
798
-
799
- .active-scaffold .required label {
800
- font-weight: bold;
801
- }
802
-
803
- .active-scaffold label.example {
804
- font-size: 11px;
805
- font-family: arial;
806
- color: #888;
807
- }
808
-
809
- .active-scaffold input.text-input,
810
- .active-scaffold select {
811
- font: bold 16px arial;
812
- letter-spacing: -1px;
813
- border: solid 1px #1F7F00;
814
- }
815
-
816
- .active-scaffold input.text-input {
817
- padding: 2px;
818
- }
819
-
820
- .active-scaffold .fieldWithErrors input,
821
- .active-scaffold .field_with_errors input,
822
- .active-scaffold .fieldWithErrors textarea,
823
- .active-scaffold .field_with_errors textarea,
824
- .active-scaffold .fieldWithErrors select,
825
- .active-scaffold .field_with_errors select {
826
- border: solid 1px #f00;
827
- }
828
-
829
- .active-scaffold select {
830
- padding: 1px;
831
- }
832
-
833
- .active-scaffold input.example {
834
- color: #aaa;
835
- }
836
-
837
- .active-scaffold select:focus,
838
- .active-scaffold input.text-input:focus {
839
- background-color: #ffc;
840
- }
841
-
842
- .active-scaffold textarea {
843
- font-family: Arial, sans-serif;
844
- font-size: 12px;
845
- padding: 1px;
846
- border: solid 1px #1F7F00;
847
- }
848
-
849
- .active-scaffold .checkbox-list {
850
- padding-left: 0px;
851
- }
852
-
853
- .active-scaffold .checkbox-list li {
854
- padding-right: 5px;
855
- display: inline;
856
- }
857
-
858
- .active-scaffold .checkbox-list li label {
859
- padding: 0 0 0 2px;
860
- }
861
-
862
- .active-scaffold .draggable-list {
863
- float: left;
864
- width: 300px;
865
- margin-right: 15px;
866
- min-height: 30px;
867
- max-height: 100px;
868
- overflow: auto;
869
- background-color: #FFFF88;
870
- }
871
-
872
- .active-scaffold .draggable-list.hover {
873
- opacity: 0.5;
874
- }
875
-
876
- .active-scaffold .draggable-list.selected {
877
- background-color: #7FCF00;
878
- }
879
-
880
- .active-scaffold .draggable-list li {
881
- display: block;
882
- }
883
-
884
- .active-scaffold .draggable-list input {
885
- display: none;
886
- }
887
-
888
- /* Form :: Sub-Sections
889
- ============================== */
890
-
891
- .active-scaffold li.sub-section {
892
- clear: left;
893
- padding: 5px 0;
894
- }
895
-
896
- /* Form :: Association Sub-Forms
897
- ============================== */
898
-
899
- .active-scaffold .sub-form {
900
- float: left;
901
- clear: left;
902
- padding: 5px 0;
903
- padding-left: 5px;
904
- }
905
-
906
- .active-scaffold .sub-form h5 {
907
- margin-left: -5px;
908
- }
909
-
910
- .active-scaffold .sub-form table,
911
- .active-scaffold .sub-form table td {
912
- width: auto;
913
- background: none;
914
- }
915
-
916
- .active-scaffold .sub-form table th {
917
- font: normal 10px verdana, sans-serif;
918
- color: #555;
919
- padding: 0 5px 0 1px;
920
- background: none;
921
- }
922
-
923
- .active-scaffold .horizontal-sub-form td dt label {
924
- display: none;
925
- }
926
-
927
- .active-scaffold .sub-form .checkbox-list {
928
- padding: 0 2px 2px 2px;
929
- background-color: #fff;
930
- border: solid 1px #1F7F00;
931
- }
932
-
933
- .active-scaffold .sub-form .checkbox-list label {
934
- display: block;
935
- }
936
-
937
- .active-scaffold .sub-form table td {
938
- border: none;
939
- background-color: transparent;
940
- padding: 1px;
941
- vertical-align: top;
942
- color: #999;
943
- }
944
-
945
- .active-scaffold .sub-form .actions {
946
- vertical-align: middle;
947
- background-color: transparent;
948
- clear: left;
949
- }
950
-
951
- .active-scaffold .sub-form .association-record a.destroy {
952
- font-weight: bold;
953
- display: block;
954
- height: 16px;
955
- padding: 0;
956
- width: 16px;
957
- text-indent: -4000px;
958
- background: url(<%= asset_data_uri 'cross.png' %>) 0 0 no-repeat;
959
- }
960
-
961
- .active-scaffold .sub-form .locked a.destroy {
962
- display: none;
963
- }
964
-
965
- .active-scaffold .sub-form .association-record a {
966
- font: bold 12px arial;
967
- }
968
-
969
- .active-scaffold .sub-form input.text-input,
970
- .active-scaffold .sub-form select {
971
- letter-spacing: 0;
972
- font: bold 12px arial;
973
- }
974
-
975
- .active-scaffold .sub-form .footer-wrapper {
976
- margin-top: 3px;
977
- margin-right: 10px;
978
- }
979
-
980
- .active-scaffold .sub-form .footer {
981
- color: #999;
982
- padding: 3px 5px;
983
- }
984
-
985
- .active-scaffold .sub-form .footer select,
986
- .active-scaffold .sub-form .footer input {
987
- font-weight: bold;
988
- font-size: 12px;
989
- padding: 0;
990
- }
991
-
992
- .active-scaffold a.visibility-toggle {
993
- font-size: 100%;
994
- }
995
-
996
- .active-scaffold-found {
997
- float:left;
998
- }
999
-
1000
- .as_touch a.inline-adapter-close {
1001
- width: 25px;
1002
- height: 27px;
1003
- background: url(<%= asset_data_uri 'close_touch.png' %>) 0 0 no-repeat;
1004
- }
1005
-
1006
- .as_touch .as_paginate {
1007
- font-size: 20px;
1008
- padding: 3px 10px;
1009
- }
1010
-
1011
- .as_touch .active-scaffold-header div.actions a {
1012
- padding: 7px 5px;
1013
- }
1014
-
1015
- .as_touch .active-scaffold .active-scaffold-header div.actions a {
1016
- padding: 7px 5px;
1017
- }
1018
-
1019
- .as_touch .active-scaffold-header div.actions .action_group ul {
1020
- line-height: 130%;
1021
- top: 23px;
1022
- }
1023
-
1024
- .as_touch .active-scaffold .active-scaffold-header div.actions .action_group ul {
1025
- top: 23px;
1026
- }
1027
-
1028
- .as_touch .active-scaffold-header div.actions a.new,
1029
- .as_touch .active-scaffold-header div.actions a.new_existing,
1030
- .as_touch .active-scaffold-header div.actions a.show_search,
1031
- .as_touch .active-scaffold-header div.actions a.show_config_list,
1032
- .as_touch .active-scaffold-header div.actions div.action_group div {
1033
- padding: 7px 5px 7px 25px;
1034
- }
1035
-
1036
- .as_touch .active-scaffold .active-scaffold-header div.actions > a.new,
1037
- .as_touch .active-scaffold .active-scaffold-header div.actions > a.new_existing,
1038
- .as_touch .active-scaffold .active-scaffold-header div.actions > a.show_search,
1039
- .as_touch .active-scaffold .active-scaffold-header div.actions > a.show_config_list,
1040
- .as_touch .active-scaffold .active-scaffold-header div.actions div.action_group > div {
1041
- padding: 7px 5px 7px 25px;
1042
- background-position: 5px 50%;
1043
- }
1044
-
1045
- .as_touch .actions .action_group ul li div {
1046
- padding: 7px 5px 7px 25px;
1047
- }
1048
-
1049
- .as_touch .actions .action_group ul li a {
1050
- padding: 7px 5px 7px 25px;
1051
- }
1052
-
1053
- .as_touch .active-scaffold-header h2 {
1054
- padding: 4px 0px;
1055
- }
1056
-
1057
- .as_touch .active-scaffold .active-scaffold-header div.actions a,
1058
- .as_touch .active-scaffold .active-scaffold-header div.actions div {
1059
- font: bold 14px arial;
1060
- }
1061
-
1062
- .as_touch .active-scaffold .active-scaffold-header div.actions {
1063
- right: 15px;
1064
- }
1065
-
1066
- .as_touch tr.record {
1067
- line-height: 130%;
1068
- }
1069
-
1070
- .as_touch th a, .as_touch th a:visited {
1071
- color: #fff;
1072
- padding: 5px 2px 5px 5px;
1073
- }
1074
-
1075
- .as_touch tr.record td {
1076
- padding: 5px 10px;
1077
- }
1
+ <% require_asset "active_scaffold_core" %>
2
+ <% if ActiveScaffold.js_framework == :jquery %>
3
+ <% require_asset "jquery-ui-timepicker-addon" %>
4
+ <% end %>