active_scaffold 3.0.12 → 3.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. data/README +21 -11
  2. data/frontends/default/images/close_touch.png +0 -0
  3. data/frontends/default/javascripts/jquery/active_scaffold.js +187 -99
  4. data/frontends/default/javascripts/prototype/active_scaffold.js +105 -33
  5. data/frontends/default/javascripts/prototype/dhtml_history.js +80 -77
  6. data/frontends/default/stylesheets/stylesheet.css +121 -2
  7. data/frontends/default/views/_action_group.html.erb +6 -2
  8. data/frontends/default/views/_base_form.html.erb +11 -5
  9. data/frontends/default/views/_base_form.html.erb~ +42 -0
  10. data/frontends/default/views/_field_search.html.erb +1 -1
  11. data/frontends/default/views/_form.html.erb +9 -7
  12. data/frontends/default/views/_form_association.html.erb +8 -3
  13. data/frontends/default/views/_form_association_footer.html.erb +10 -3
  14. data/frontends/default/views/_form_attribute.html.erb +8 -3
  15. data/frontends/default/views/_horizontal_subform.html.erb +12 -2
  16. data/frontends/default/views/_horizontal_subform_header.html.erb +1 -1
  17. data/frontends/default/views/_horizontal_subform_record.html.erb +5 -4
  18. data/frontends/default/views/_list_messages.html.erb +1 -1
  19. data/frontends/default/views/_list_with_header.html.erb +1 -1
  20. data/frontends/default/views/_render_field.js.rjs +4 -6
  21. data/frontends/default/views/_vertical_subform.html.erb +1 -1
  22. data/frontends/default/views/_vertical_subform_record.html.erb +2 -2
  23. data/frontends/default/views/on_action_update.js.rjs +3 -1
  24. data/frontends/default/views/on_mark_all.js.rjs +12 -0
  25. data/frontends/default/views/on_update.js.rjs +1 -1
  26. data/frontends/default/views/render_field.js.rjs +1 -0
  27. data/frontends/default/views/update_column.js.rjs +1 -1
  28. data/lib/active_scaffold.rb +60 -21
  29. data/lib/active_scaffold/actions/common_search.rb +2 -2
  30. data/lib/active_scaffold/actions/core.rb +30 -9
  31. data/lib/active_scaffold/actions/create.rb +14 -10
  32. data/lib/active_scaffold/actions/field_search.rb +6 -6
  33. data/lib/active_scaffold/actions/list.rb +22 -12
  34. data/lib/active_scaffold/actions/mark.rb +34 -9
  35. data/lib/active_scaffold/actions/nested.rb +12 -16
  36. data/lib/active_scaffold/actions/show.rb +2 -2
  37. data/lib/active_scaffold/actions/subform.rb +15 -8
  38. data/lib/active_scaffold/actions/update.rb +14 -4
  39. data/lib/active_scaffold/attribute_params.rb +15 -10
  40. data/lib/active_scaffold/bridges/bridge.rb +21 -12
  41. data/lib/active_scaffold/bridges/calendar_date_select/bridge.rb +3 -3
  42. data/lib/active_scaffold/bridges/cancan/bridge.rb +12 -0
  43. data/lib/active_scaffold/bridges/cancan/lib/cancan_bridge.rb +107 -0
  44. data/lib/active_scaffold/bridges/carrierwave/bridge.rb +1 -1
  45. data/lib/active_scaffold/bridges/carrierwave/lib/carrierwave_bridge.rb +3 -8
  46. data/lib/active_scaffold/bridges/carrierwave/lib/carrierwave_bridge_helpers.rb +1 -15
  47. data/lib/active_scaffold/bridges/carrierwave/lib/form_ui.rb +23 -13
  48. data/lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb +1 -1
  49. data/lib/active_scaffold/bridges/country_helper/bridge.rb +9 -0
  50. data/lib/active_scaffold/bridges/country_helper/lib/country_helper_bridge.rb +358 -0
  51. data/lib/active_scaffold/bridges/date_picker/bridge.rb +5 -3
  52. data/lib/active_scaffold/bridges/date_picker/lib/datepicker_bridge.rb +9 -0
  53. data/lib/active_scaffold/bridges/dragonfly/bridge.rb +9 -0
  54. data/lib/active_scaffold/bridges/dragonfly/bridge.rb~ +12 -0
  55. data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge.rb +36 -0
  56. data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge.rb~ +36 -0
  57. data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge_helpers.rb +12 -0
  58. data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge_helpers.rb~ +12 -0
  59. data/lib/active_scaffold/bridges/dragonfly/lib/form_ui.rb +27 -0
  60. data/lib/active_scaffold/bridges/dragonfly/lib/form_ui.rb~ +27 -0
  61. data/lib/active_scaffold/bridges/dragonfly/lib/list_ui.rb +16 -0
  62. data/lib/active_scaffold/bridges/dragonfly/lib/list_ui.rb~ +16 -0
  63. data/lib/active_scaffold/bridges/paperclip/bridge.rb +1 -1
  64. data/lib/active_scaffold/bridges/record_select/bridge.rb +5 -0
  65. data/lib/active_scaffold/bridges/record_select/lib/record_select_bridge.rb +87 -0
  66. data/lib/active_scaffold/bridges/record_select/lib/record_select_bridge.rb~ +84 -0
  67. data/lib/active_scaffold/bridges/shared/date_bridge.rb +56 -34
  68. data/lib/active_scaffold/bridges/tiny_mce/lib/tiny_mce_bridge.rb +19 -3
  69. data/lib/active_scaffold/config/base.rb +4 -4
  70. data/lib/active_scaffold/config/core.rb +4 -0
  71. data/lib/active_scaffold/config/create.rb +1 -1
  72. data/lib/active_scaffold/config/field_search.rb +7 -7
  73. data/lib/active_scaffold/config/form.rb +8 -2
  74. data/lib/active_scaffold/config/list.rb +22 -8
  75. data/lib/active_scaffold/config/mark.rb +18 -5
  76. data/lib/active_scaffold/config/nested.rb +3 -3
  77. data/lib/active_scaffold/config/search.rb +1 -1
  78. data/lib/active_scaffold/config/show.rb +1 -1
  79. data/lib/active_scaffold/data_structures/action_columns.rb +10 -6
  80. data/lib/active_scaffold/data_structures/action_link.rb +14 -10
  81. data/lib/active_scaffold/data_structures/action_links.rb +2 -2
  82. data/lib/active_scaffold/data_structures/column.rb +25 -11
  83. data/lib/active_scaffold/data_structures/nested_info.rb +21 -21
  84. data/lib/active_scaffold/data_structures/set.rb +2 -3
  85. data/lib/active_scaffold/data_structures/sorting.rb +8 -8
  86. data/lib/{extensions → active_scaffold/extensions}/action_controller_rendering.rb +3 -1
  87. data/lib/{extensions → active_scaffold/extensions}/action_view_rendering.rb +31 -33
  88. data/lib/{extensions → active_scaffold/extensions}/action_view_resolver.rb +0 -0
  89. data/lib/{extensions → active_scaffold/extensions}/active_association_reflection.rb +0 -0
  90. data/lib/active_scaffold/extensions/active_record_offset.rb +12 -0
  91. data/lib/{extensions → active_scaffold/extensions}/array.rb +0 -0
  92. data/lib/{extensions → active_scaffold/extensions}/localize.rb +1 -1
  93. data/lib/{extensions → active_scaffold/extensions}/name_option_for_datetime.rb +1 -1
  94. data/lib/{extensions → active_scaffold/extensions}/nil_id_in_url_params.rb +0 -0
  95. data/lib/{extensions → active_scaffold/extensions}/paginator_extensions.rb +2 -2
  96. data/lib/{extensions → active_scaffold/extensions}/reverse_associations.rb +1 -1
  97. data/lib/{extensions → active_scaffold/extensions}/routing_mapper.rb +2 -2
  98. data/lib/{extensions → active_scaffold/extensions}/to_label.rb +0 -0
  99. data/lib/{extensions → active_scaffold/extensions}/unsaved_associated.rb +0 -0
  100. data/lib/{extensions → active_scaffold/extensions}/unsaved_record.rb +0 -0
  101. data/lib/active_scaffold/extensions/usa_state.rb +46 -0
  102. data/lib/active_scaffold/finder.rb +30 -19
  103. data/lib/active_scaffold/helpers/controller_helpers.rb +3 -5
  104. data/lib/active_scaffold/helpers/form_column_helpers.rb +19 -45
  105. data/lib/active_scaffold/helpers/human_condition_helpers.rb +1 -1
  106. data/lib/active_scaffold/helpers/id_helpers.rb +2 -2
  107. data/lib/active_scaffold/helpers/list_column_helpers.rb +28 -17
  108. data/lib/active_scaffold/helpers/search_column_helpers.rb +51 -40
  109. data/lib/active_scaffold/helpers/search_column_helpers.rb~ +215 -0
  110. data/lib/active_scaffold/helpers/show_column_helpers.rb +8 -4
  111. data/lib/active_scaffold/helpers/view_helpers.rb +50 -27
  112. data/lib/active_scaffold/locale/de.yml +111 -0
  113. data/lib/active_scaffold/locale/en.yml +115 -0
  114. data/lib/active_scaffold/locale/es.yml +32 -32
  115. data/lib/active_scaffold/locale/fr.yml +118 -0
  116. data/lib/active_scaffold/marked_model.rb +6 -6
  117. data/lib/active_scaffold/version.rb +1 -1
  118. data/lib/active_scaffold_assets.rb +1 -3
  119. data/lib/active_scaffold_env.rb +1 -2
  120. data/lib/generators/active_scaffold/active_scaffold_generator.rb +5 -5
  121. data/lib/generators/active_scaffold_controller/active_scaffold_controller_generator.rb +3 -2
  122. data/lib/generators/active_scaffold_controller/templates/helper.rb +2 -0
  123. data/lib/generators/active_scaffold_setup/active_scaffold_setup_generator.rb +17 -19
  124. data/shoulda_macros/macros.rb +4 -4
  125. data/test/misc/finder_test.rb +2 -2
  126. data/test/mock_app/public/stylesheets/active_scaffold/default/stylesheet.css +4 -1
  127. metadata +144 -126
  128. data/.autotest +0 -27
  129. data/.document +0 -5
  130. data/Gemfile +0 -13
  131. data/Gemfile.lock +0 -20
  132. data/Rakefile +0 -53
  133. data/active_scaffold.gemspec +0 -385
  134. data/init.rb +0 -2
  135. data/lib/active_scaffold/helpers/country_helpers.rb +0 -358
  136. data/lib/active_scaffold/locale/de.rb +0 -120
  137. data/lib/active_scaffold/locale/en.rb +0 -119
  138. data/lib/active_scaffold/locale/fr.rb +0 -116
  139. data/lib/extensions/active_record_offset.rb +0 -12
  140. data/lib/extensions/usa_state.rb +0 -50
  141. data/test/mock_app/.gitignore +0 -2
  142. data/uninstall.rb +0 -13
@@ -155,6 +155,10 @@ document.observe("dom:loaded", function() {
155
155
  csrf_token = $$('meta[name=csrf-token]')[0],
156
156
  my_parent = span.up(),
157
157
  column_heading = null;
158
+
159
+ if(!(my_parent.nodeName.toLowerCase() === 'td' || my_parent.nodeName.toLowerCase() === 'th')){
160
+ my_parent = span.up('td');
161
+ }
158
162
 
159
163
  if (my_parent.nodeName.toLowerCase() === 'td') {
160
164
  var heading_selector = '.' + span.up().readAttribute('class').split(' ')[0] + '_heading';
@@ -180,7 +184,7 @@ document.observe("dom:loaded", function() {
180
184
 
181
185
  if (span.up('div.active-scaffold').readAttribute('data-eid')) {
182
186
  if (options['params'].length > 0) {
183
- options['params'] += ";";
187
+ options['params'] += "&";
184
188
  }
185
189
  options['params'] += ("eid=" + span.up('div.active-scaffold').readAttribute('data-eid'));
186
190
  }
@@ -226,7 +230,7 @@ document.observe("dom:loaded", function() {
226
230
  if(loading_indicator) loading_indicator.style.visibility = 'hidden';
227
231
  return true;
228
232
  });
229
- document.on('ajax:before', 'input[type=button].as_add_existing', function(event) {
233
+ document.on('ajax:before', 'input[type=button].as_add_existing, input[type=button].as_replace_existing', function(event) {
230
234
  var button = event.findElement();
231
235
  var url = button.readAttribute('href').sub('--ID--', button.previous().getValue());
232
236
  event.memo.url = url;
@@ -234,26 +238,7 @@ document.observe("dom:loaded", function() {
234
238
  });
235
239
  document.on('change', 'input.update_form, select.update_form', function(event) {
236
240
  var element = event.findElement();
237
- var as_form = element.up('form.as_form');
238
-
239
- new Ajax.Request(element.readAttribute('data-update_url'), {
240
- method: 'get',
241
- parameters: {value: element.getValue()},
242
- onLoading: function(response) {
243
- element.next('img.loading-indicator').style.visibility = 'visible';
244
- as_form.disable();
245
- },
246
- onComplete: function(response) {
247
- element.next('img.loading-indicator').style.visibility = 'hidden';
248
- as_form.enable();
249
- },
250
- onFailure: function(request) {
251
- var as_div = event.findElement('div.active-scaffold');
252
- if (as_div) {
253
- ActiveScaffold.report_500_response(as_div)
254
- }
255
- }
256
- });
241
+ ActiveScaffold.update_column(element, element.readAttribute('data-update_url'), element.hasAttribute('data-update_send_form'), element.readAttribute('id'), element.getValue());
257
242
  return true;
258
243
  });
259
244
  document.on('change', 'select.as_search_range_option', function(event) {
@@ -276,10 +261,27 @@ document.observe("dom:loaded", function() {
276
261
  return true;
277
262
  });
278
263
  document.on("click", "a[data-popup]", function(event, element) {
279
- if (event.stopped) return;
280
- window.open($(element).href);
281
- event.stop();
282
- });
264
+ if (event.stopped) return;
265
+ window.open($(element).href);
266
+ event.stop();
267
+ });
268
+ document.on("click", ".hover_click", function(event, element) {
269
+ var ul_element = element.down('ul');
270
+ if (ul_element.getStyle('display') === 'none') {
271
+ ul_element.style.display = 'block';
272
+ } else {
273
+ ul_element.style.display = 'none';
274
+ }
275
+
276
+ return true;
277
+ });
278
+ document.on("click", ".hover_click a.as_action", function(event, element) {
279
+ var element = element.up('.hover_click').down('ul');
280
+ if (element) {
281
+ element.style.display = 'none';
282
+ }
283
+ return true;
284
+ });
283
285
  });
284
286
 
285
287
 
@@ -451,6 +453,14 @@ var ActiveScaffold = {
451
453
  this.reload_if_empty(tbody, page_reload_url);
452
454
  },
453
455
 
456
+ delete_subform_record: function(record) {
457
+ var errors = $(record).previous();
458
+ if (errors.hasClassName('association-record-errors')) {
459
+ this.replace_html(errors, '');
460
+ }
461
+ this.remove(record);
462
+ },
463
+
454
464
  report_500_response: function(active_scaffold_id) {
455
465
  server_error = $(active_scaffold_id).down('td.messages-container p.server-error');
456
466
  if (server_error.visible()) {
@@ -524,7 +534,7 @@ var ActiveScaffold = {
524
534
  element.insert(content);
525
535
  }
526
536
  } else {
527
- var current = $$('#' + element.readAttribute('id') + ' tr.association-record');
537
+ var current = $$('#' + element.readAttribute('id') + ' .association-record');
528
538
  if (current[0]) {
529
539
  this.replace(current[0], content);
530
540
  } else {
@@ -533,12 +543,20 @@ var ActiveScaffold = {
533
543
  }
534
544
  },
535
545
 
536
- render_form_field: function(element, content, options) {
537
- var element = $(element);
538
- if (options.is_subform == false) {
539
- this.replace(element.up('dl'), content);
540
- } else {
541
- this.replace_html(element, content);
546
+ render_form_field: function(source, content, options) {
547
+ var source = $(source);
548
+ var element = source.up('.association-record');
549
+ if (typeof(element) === 'undefined') {
550
+ element = source.up('ol.form');
551
+ }
552
+ element = element.down('.' + options.field_class);
553
+
554
+ if (element) {
555
+ if (options.is_subform == false) {
556
+ this.replace(element.up('dl'), content);
557
+ } else {
558
+ this.replace_html(element, content);
559
+ }
542
560
  }
543
561
  },
544
562
 
@@ -552,6 +570,60 @@ var ActiveScaffold = {
552
570
  }
553
571
  }
554
572
  );
573
+ },
574
+
575
+ // element is tbody id
576
+ mark_records: function(element, options) {
577
+ var element = $(element);
578
+ var mark_checkboxes = $$('#' + element.readAttribute('id') + ' > tr.record td.marked-column input[type="checkbox"]');
579
+ mark_checkboxes.each(function(item) {
580
+ if(options.checked === true) {
581
+ item.writeAttribute({ checked: 'checked' });
582
+ } else {
583
+ item.removeAttribute('checked');
584
+ }
585
+ item.writeAttribute('value', ('' + !options.checked));
586
+ });
587
+ if(options.include_mark_all === true) {
588
+ var mark_all_checkbox = element.previous('thead').down('th.marked-column_heading span input[type="checkbox"]');
589
+ if(options.checked === true) {
590
+ mark_all_checkbox.writeAttribute({ checked: 'checked' });
591
+ } else {
592
+ mark_all_checkbox.removeAttribute('checked');
593
+ }
594
+ mark_all_checkbox.writeAttribute('value', ('' + !options.checked));
595
+ }
596
+ },
597
+
598
+ update_column: function(element, url, send_form, source_id, val) {
599
+ var as_form = element.up('form.as_form');
600
+ var params = null;
601
+
602
+ if (send_form) {
603
+ params = as_form.serialize(true);
604
+ } else {
605
+ params = {value: val};
606
+ }
607
+ params.source_id = source_id;
608
+
609
+ new Ajax.Request(url, {
610
+ method: 'get',
611
+ parameters: params,
612
+ onLoading: function(response) {
613
+ element.next('img.loading-indicator').style.visibility = 'visible';
614
+ as_form.disable();
615
+ },
616
+ onComplete: function(response) {
617
+ element.next('img.loading-indicator').style.visibility = 'hidden';
618
+ as_form.enable();
619
+ },
620
+ onFailure: function(request) {
621
+ var as_div = event.findElement('div.active-scaffold');
622
+ if (as_div) {
623
+ ActiveScaffold.report_500_response(as_div)
624
+ }
625
+ }
626
+ });
555
627
  }
556
628
  }
557
629
 
@@ -53,18 +53,6 @@ window.dhtmlHistory = {
53
53
 
54
54
  var that = this;
55
55
 
56
- /*Set up the historyStorage object; pass in options bundle*/
57
- window.historyStorage.setup(options);
58
-
59
- /*Set up our base title if one is passed in*/
60
- if (options && options.baseTitle) {
61
- if (options.baseTitle.indexOf("@@@") < 0 && historyStorage.debugMode) {
62
- throw new Error("Programmer error: options.baseTitle must contain the replacement parameter"
63
- + " '@@@' to be useful.");
64
- }
65
- this.baseTitle = options.baseTitle;
66
- }
67
-
68
56
  /*set user-agent flags*/
69
57
  var UA = navigator.userAgent.toLowerCase();
70
58
  var platform = navigator.platform.toLowerCase();
@@ -80,77 +68,92 @@ window.dhtmlHistory = {
80
68
  this.isSupported = true;
81
69
  } else if (vendor.indexOf("Apple Computer, Inc.") > -1) {
82
70
  this.isSafari = true;
83
- this.isSupported = (platform.indexOf("mac") > -1);
71
+ //this.isSupported = (platform.indexOf("mac") > -1);
72
+ this.isSupported = false;
84
73
  } else if (UA.indexOf("gecko") != -1) {
85
74
  this.isGecko = true;
86
75
  this.isSupported = true;
87
76
  }
88
77
 
89
- /*Create Safari/Opera-specific code*/
90
- if (this.isSafari) {
91
- this.createSafari();
92
- } else if (this.isOpera) {
93
- this.createOpera();
94
- }
95
-
96
- /*Get our initial location*/
97
- var initialHash = this.getCurrentLocation();
98
-
99
- /*Save it as our current location*/
100
- this.currentLocation = initialHash;
101
-
102
- /*Now that we have a hash, create IE-specific code*/
103
- if (this.isIE) {
104
- /*Optionally override the URL of IE's blank HTML file*/
105
- if (options && options.blankURL) {
106
- var u = options.blankURL;
107
- /*assign the value, adding the trailing ? if it's not passed in*/
108
- this.blankURL = (u.indexOf("?") != u.length - 1
109
- ? u + "?"
110
- : u
111
- );
112
- }
113
- this.createIE(initialHash);
114
- }
115
-
116
- /*Add an unload listener for the page; this is needed for FF 1.5+ because this browser caches all dynamic updates to the
117
- page, which can break some of our logic related to testing whether this is the first instance a page has loaded or whether
118
- it is being pulled from the cache*/
119
-
120
- var unloadHandler = function() {
121
- that.firstLoad = null;
122
- };
123
-
124
- this.addEventListener(window,'unload',unloadHandler);
125
-
126
- /*Determine if this is our first page load; for IE, we do this in this.iframeLoaded(), which is fired on pageload. We do it
127
- there because we have no historyStorage at this point, which only exists after the page is finished loading in IE*/
128
- if (this.isIE) {
129
- /*The iframe will get loaded on page load, and we want to ignore this fact*/
130
- this.ignoreLocationChange = true;
131
- } else {
132
- if (!historyStorage.hasKey(this.PAGELOADEDSTRING)) {
133
- /*This is our first page load, so ignore the location change and add our special history entry*/
134
- this.ignoreLocationChange = true;
135
- this.firstLoad = true;
136
- historyStorage.put(this.PAGELOADEDSTRING, true);
137
- } else {
138
- /*This isn't our first page load, so indicate that we want to pay attention to this location change*/
139
- this.ignoreLocationChange = false;
140
- this.firstLoad = false;
141
- /*For browsers other than IE, fire a history change event; on IE, the event will be thrown automatically when its
142
- hidden iframe reloads on page load. Unfortunately, we don't have any listeners yet; indicate that we want to fire
143
- an event when a listener is added.*/
144
- this.fireOnNewListener = true;
145
- }
78
+ if (this.isSupported) {
79
+ /*Set up the historyStorage object; pass in options bundle*/
80
+ window.historyStorage.setup(options);
81
+
82
+ /*Set up our base title if one is passed in*/
83
+ if (options && options.baseTitle) {
84
+ if (options.baseTitle.indexOf("@@@") < 0 && historyStorage.debugMode) {
85
+ throw new Error("Programmer error: options.baseTitle must contain the replacement parameter"
86
+ + " '@@@' to be useful.");
87
+ }
88
+ this.baseTitle = options.baseTitle;
89
+ }
90
+
91
+ /*Create Safari/Opera-specific code*/
92
+ if (this.isSafari && this.isSupported) {
93
+ this.createSafari();
94
+ } else if (this.isOpera) {
95
+ this.createOpera();
96
+ }
97
+
98
+ /*Get our initial location*/
99
+ var initialHash = this.getCurrentLocation();
100
+
101
+ /*Save it as our current location*/
102
+ this.currentLocation = initialHash;
103
+
104
+ /*Now that we have a hash, create IE-specific code*/
105
+ if (this.isIE) {
106
+ /*Optionally override the URL of IE's blank HTML file*/
107
+ if (options && options.blankURL) {
108
+ var u = options.blankURL;
109
+ /*assign the value, adding the trailing ? if it's not passed in*/
110
+ this.blankURL = (u.indexOf("?") != u.length - 1
111
+ ? u + "?"
112
+ : u
113
+ );
114
+ }
115
+ this.createIE(initialHash);
116
+ }
117
+
118
+ /*Add an unload listener for the page; this is needed for FF 1.5+ because this browser caches all dynamic updates to the
119
+ page, which can break some of our logic related to testing whether this is the first instance a page has loaded or whether
120
+ it is being pulled from the cache*/
121
+
122
+ var unloadHandler = function() {
123
+ that.firstLoad = null;
124
+ };
125
+
126
+ this.addEventListener(window,'unload',unloadHandler);
127
+
128
+ /*Determine if this is our first page load; for IE, we do this in this.iframeLoaded(), which is fired on pageload. We do it
129
+ there because we have no historyStorage at this point, which only exists after the page is finished loading in IE*/
130
+ if (this.isIE) {
131
+ /*The iframe will get loaded on page load, and we want to ignore this fact*/
132
+ this.ignoreLocationChange = true;
133
+ } else if (this.isSupported) {
134
+ if (!historyStorage.hasKey(this.PAGELOADEDSTRING)) {
135
+ /*This is our first page load, so ignore the location change and add our special history entry*/
136
+ this.ignoreLocationChange = true;
137
+ this.firstLoad = true;
138
+ historyStorage.put(this.PAGELOADEDSTRING, true);
139
+ } else {
140
+ /*This isn't our first page load, so indicate that we want to pay attention to this location change*/
141
+ this.ignoreLocationChange = false;
142
+ this.firstLoad = false;
143
+ /*For browsers other than IE, fire a history change event; on IE, the event will be thrown automatically when its
144
+ hidden iframe reloads on page load. Unfortunately, we don't have any listeners yet; indicate that we want to fire
145
+ an event when a listener is added.*/
146
+ this.fireOnNewListener = true;
147
+ }
148
+ }
149
+
150
+ /*Other browsers can use a location handler that checks at regular intervals as their primary mechanism; we use it for IE as
151
+ well to handle an important edge case; see checkLocation() for details*/
152
+ var locationHandler = function() {
153
+ that.checkLocation();
154
+ };
155
+ setInterval(locationHandler, 100);
146
156
  }
147
-
148
- /*Other browsers can use a location handler that checks at regular intervals as their primary mechanism; we use it for IE as
149
- well to handle an important edge case; see checkLocation() for details*/
150
- var locationHandler = function() {
151
- that.checkLocation();
152
- };
153
- setInterval(locationHandler, 100);
154
157
  },
155
158
 
156
159
  /*Public: Initialize our DHTML history. You must call this after the page is finished loading. Optionally, you can pass your listener in
@@ -35,7 +35,7 @@ text-decoration: none;
35
35
  color: #999;
36
36
  }
37
37
 
38
- .active-scaffold a:hover, .active-scaffold div.hover {
38
+ .active-scaffold a:hover, .active-scaffold div.hover, .active-scaffold td span.hover {
39
39
  background-color: #ff8;
40
40
  }
41
41
 
@@ -99,6 +99,15 @@ background-position: 1px 50%;
99
99
  background-repeat: no-repeat;
100
100
  }
101
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
+
102
111
  .active-scaffold-header div.actions div.action_group {
103
112
  display: inline;
104
113
  float: right;
@@ -112,6 +121,10 @@ margin: 0;
112
121
 
113
122
  .active-scaffold-header div.actions .action_group ul {
114
123
  line-height: 130%;
124
+ top: 19px;
125
+ }
126
+
127
+ .active-scaffold .active-scaffold .active-scaffold-header div.actions .action_group ul {
115
128
  top: 14px;
116
129
  }
117
130
 
@@ -141,6 +154,17 @@ opacity: 0.5;
141
154
  .active-scaffold-header div.actions a.show_config_list,
142
155
  .active-scaffold-header div.actions div.action_group div {
143
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;
144
168
  padding: 1px 5px 1px 20px;
145
169
  background-position: 1px 50%;
146
170
  background-repeat: no-repeat;
@@ -755,6 +779,7 @@ padding: 6px 0;
755
779
  float: left;
756
780
  }
757
781
 
782
+ .active-scaffold li.form-element dd p,
758
783
  .active-scaffold li.form-element dd input[type="checkbox"] {
759
784
  margin-top: 6px;
760
785
  }
@@ -793,8 +818,11 @@ padding: 2px;
793
818
  }
794
819
 
795
820
  .active-scaffold .fieldWithErrors input,
821
+ .active-scaffold .field_with_errors input,
796
822
  .active-scaffold .fieldWithErrors textarea,
797
- .active-scaffold .fieldWithErrors select {
823
+ .active-scaffold .field_with_errors textarea,
824
+ .active-scaffold .fieldWithErrors select,
825
+ .active-scaffold .field_with_errors select {
798
826
  border: solid 1px #f00;
799
827
  }
800
828
 
@@ -968,3 +996,94 @@ font-size: 100%;
968
996
  .active-scaffold-found {
969
997
  float:left;
970
998
  }
999
+
1000
+
1001
+ .active-scaffold-component > .active-scaffold-header h2 {
1002
+ border: none;
1003
+ }
1004
+ .active-scaffold-component > .active-scaffold-header h2 a,
1005
+ .active-scaffold-component > .active-scaffold-header h2 a:active,
1006
+ .active-scaffold-component > .active-scaffold-header h2 a:visited {
1007
+ text-decoration: none;
1008
+ color: inherit;
1009
+ }
1010
+
1011
+
1012
+ .as_touch a.inline-adapter-close {
1013
+ width: 25px;
1014
+ height: 27px;
1015
+ background: url(../../../images/active_scaffold/default/close_touch.png) 0 0 no-repeat;
1016
+ }
1017
+
1018
+ .as_touch .as_paginate {
1019
+ font-size: 20px;
1020
+ padding: 3px 10px;
1021
+ }
1022
+
1023
+ .as_touch .active-scaffold-header div.actions a {
1024
+ padding: 7px 5px;
1025
+ }
1026
+
1027
+ .as_touch .active-scaffold .active-scaffold-header div.actions a {
1028
+ padding: 7px 5px;
1029
+ }
1030
+
1031
+ .as_touch .active-scaffold-header div.actions .action_group ul {
1032
+ line-height: 130%;
1033
+ top: 23px;
1034
+ }
1035
+
1036
+ .as_touch .active-scaffold .active-scaffold-header div.actions .action_group ul {
1037
+ top: 23px;
1038
+ }
1039
+
1040
+ .as_touch .active-scaffold-header div.actions a.new,
1041
+ .as_touch .active-scaffold-header div.actions a.new_existing,
1042
+ .as_touch .active-scaffold-header div.actions a.show_search,
1043
+ .as_touch .active-scaffold-header div.actions a.show_config_list,
1044
+ .as_touch .active-scaffold-header div.actions div.action_group div {
1045
+ padding: 7px 5px 7px 25px;
1046
+ }
1047
+
1048
+ .as_touch .active-scaffold .active-scaffold-header div.actions > a.new,
1049
+ .as_touch .active-scaffold .active-scaffold-header div.actions > a.new_existing,
1050
+ .as_touch .active-scaffold .active-scaffold-header div.actions > a.show_search,
1051
+ .as_touch .active-scaffold .active-scaffold-header div.actions > a.show_config_list,
1052
+ .as_touch .active-scaffold .active-scaffold-header div.actions div.action_group > div {
1053
+ padding: 7px 5px 7px 25px;
1054
+ background-position: 5px 50%;
1055
+ }
1056
+
1057
+ .as_touch .actions .action_group ul li div {
1058
+ padding: 7px 5px 7px 25px;
1059
+ }
1060
+
1061
+ .as_touch .actions .action_group ul li a {
1062
+ padding: 7px 5px 7px 25px;
1063
+ }
1064
+
1065
+ .as_touch .active-scaffold-header h2 {
1066
+ padding: 4px 0px;
1067
+ }
1068
+
1069
+ .as_touch .active-scaffold .active-scaffold-header div.actions a,
1070
+ .as_touch .active-scaffold .active-scaffold-header div.actions div {
1071
+ font: bold 14px arial;
1072
+ }
1073
+
1074
+ .as_touch .active-scaffold .active-scaffold-header div.actions {
1075
+ right: 15px;
1076
+ }
1077
+
1078
+ .as_touch tr.record {
1079
+ line-height: 130%;
1080
+ }
1081
+
1082
+ .as_touch th a, .as_touch th a:visited {
1083
+ color: #fff;
1084
+ padding: 5px 2px 5px 5px;
1085
+ }
1086
+
1087
+ .as_touch tr.record td {
1088
+ padding: 5px 10px;
1089
+ }