aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Markech <martin.markech@matho.sk>2012-09-30 19:56:31 +0200
committerMartin Markech <martin.markech@matho.sk>2012-09-30 19:56:31 +0200
commit5225251f0463662c5ccae4332dbd17f90036a760 (patch)
treeae212b54ea0f52e4b9933d34ed7f1079cd69e442
parenta07146a6126a087f899318ab563582b3cf7f1760 (diff)
downloadrefinerycms-pc_banners-5225251f0463662c5ccae4332dbd17f90036a760.tar.gz
refinerycms-pc_banners-5225251f0463662c5ccae4332dbd17f90036a760.tar.bz2
refinerycms-pc_banners-5225251f0463662c5ccae4332dbd17f90036a760.zip
temp fix for jquery tristate - render only on new action, because on edit it has problems to correctly render some checkboxes
-rw-r--r--app/views/refinery/banners/admin/banners/_form.html.erb4
-rw-r--r--app/views/refinery/banners/admin/banners/new.html.erb6
2 files changed, 6 insertions, 4 deletions
diff --git a/app/views/refinery/banners/admin/banners/_form.html.erb b/app/views/refinery/banners/admin/banners/_form.html.erb
index b249f09..3ea7421 100644
--- a/app/views/refinery/banners/admin/banners/_form.html.erb
+++ b/app/views/refinery/banners/admin/banners/_form.html.erb
@@ -1,7 +1,3 @@
-<%- content_for(:javascripts) do -%>
- <%= javascript_include_tag "banners/jquery.tristate.js", "banners/banners.js" -%>
-<%- end -%>
-
<%= form_for [refinery, :banners_admin, @banner] do |f| -%>
<%= render '/refinery/admin/error_messages',
:object => @banner,
diff --git a/app/views/refinery/banners/admin/banners/new.html.erb b/app/views/refinery/banners/admin/banners/new.html.erb
index 2d34363..967b41e 100644
--- a/app/views/refinery/banners/admin/banners/new.html.erb
+++ b/app/views/refinery/banners/admin/banners/new.html.erb
@@ -1 +1,7 @@
+<%# TODO temp fix - activate tristate only on new. There is bug and inproperly render some checkboxes in edit action %>
+<%- content_for(:javascripts) do -%>
+ <%= javascript_include_tag "banners/jquery.tristate.js", "banners/banners.js" -%>
+<%- end -%>
+
<%= render 'form' %>
+