diff --git a/app/assets/javascripts/ajax_form.js b/app/assets/javascripts/ajax_form.js
index c026e518..d9b5abfe 100644
--- a/app/assets/javascripts/ajax_form.js
+++ b/app/assets/javascripts/ajax_form.js
@@ -1,4 +1,4 @@
-$('#submit_button').live('click', function(){
+$(document).on('click', '#ajax_form_submit', function(){
$('#ajaxForm').ajaxSubmit({
beforeSubmit: function(a,f,o) {
o.dataType = 'script';
diff --git a/app/assets/javascripts/bulletin_form.js.erb b/app/assets/javascripts/bulletin_form.js.erb
index abb908b4..01685c3d 100644
--- a/app/assets/javascripts/bulletin_form.js.erb
+++ b/app/assets/javascripts/bulletin_form.js.erb
@@ -6,10 +6,9 @@ $('.bulletin_files_block a.delete').live('click', function(){
$(this).parents('.list_item').remove();
});
-$('.action a.remove_existing_record').live('click', function(){
+$(document).on('click', '.action a.remove_existing_record', function(){
$(this).next('.should_destroy').attr('value', 1);
- //$("#bulletin_" + $(this).prev().attr('value')).hide();
- $("tr#bulletin_" + $(this).prev().attr('value')).hide();
+ $("tr #" + $(this).prev().attr('value')).hide();
});
$('.quick_edit_cancel').live('click', function(){
diff --git a/app/assets/javascripts/new_admin.js b/app/assets/javascripts/new_admin.js
index 45bfcbbc..f20267cd 100644
--- a/app/assets/javascripts/new_admin.js
+++ b/app/assets/javascripts/new_admin.js
@@ -6,6 +6,7 @@
//
//= require jquery
//= require jquery_ujs
+//= require jquery.form
//= require bootstrap
//= require jquery.isotope.min
//= require jquery.tinyscrollbar.min
@@ -13,4 +14,5 @@
//= require tinymce-jquery
//= require tinymce_orbit
//= require orbit-bar-search
-//= require side_bar_history
\ No newline at end of file
+//= require side_bar_history
+//= require ajax_form
\ No newline at end of file
diff --git a/app/assets/javascripts/side_bar_history.js b/app/assets/javascripts/side_bar_history.js
index 4b5da1d4..ad29b497 100644
--- a/app/assets/javascripts/side_bar_history.js
+++ b/app/assets/javascripts/side_bar_history.js
@@ -1,28 +1,28 @@
var history_edited = false;
-// $('#back_sidebar a, #back_main a.nav').live('click',
-// function () {
-// $.getScript(this.href);
-// history.pushState(null, document.title, this.href);
-// history_edited = true;
-// return false;
-// }
-// );
+$('#back_sidebar a, #back_main a.nav').live('click',
+ function () {
+ $.getScript(this.href);
+ history.pushState(null, document.title, this.href);
+ history_edited = true;
+ return false;
+ }
+);
-// $('#back_main a.reload').live('click',
-// function () {
-// $.getScript(this.href);
-// history.replaceState(null, document.title, this.href);
-// history_edited = true;
-// return false;
-// }
-// );
+$('#back_main a.reload').live('click',
+ function () {
+ $.getScript(this.href);
+ history.replaceState(null, document.title, this.href);
+ history_edited = true;
+ return false;
+ }
+);
-// $('.form').live('submit', function () {
-// $.post(this.action, $(this).serialize(), null, 'script');
-// history_edited = true;
-// return false;
-// });
+$('#back_main .form').live('submit', function () {
+ $.post(this.action, $(this).serialize(), null, 'script');
+ history_edited = true;
+ return false;
+});
$(document).on('click', '.js_history',
function () {
diff --git a/app/assets/javascripts/site_editor.js b/app/assets/javascripts/site_editor.js
index 1eb5e3f1..4451accb 100644
--- a/app/assets/javascripts/site_editor.js
+++ b/app/assets/javascripts/site_editor.js
@@ -6,6 +6,10 @@
//
//= require jquery
//= require jquery_ujs
-//= require page_edit
+//= require bootstrap
+//= require jquery.isotope.min
+//= require jquery.tinyscrollbar.min
+//= require orbit-1.0
+//= require orbit-bar-search
//= require side_bar_history
-//= require new_admin
\ No newline at end of file
+//= require page_edit
\ No newline at end of file
diff --git a/app/assets/stylesheets/site_editor.css.erb b/app/assets/stylesheets/site_editor.css.erb
index 1e16ea3f..e36d0b7b 100644
--- a/app/assets/stylesheets/site_editor.css.erb
+++ b/app/assets/stylesheets/site_editor.css.erb
@@ -5,6 +5,10 @@
*= require reset
*= require_self
*= require message
+ *= require bootstrap
+ *= require style
+ *= require bootstrap-orbit
+ *= require scroll_style
*= require site_items
*= require sidebar
*/
\ No newline at end of file
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 7337b274..52ad71c0 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -124,11 +124,13 @@ module ApplicationHelper
"
#{page.title ? page.title[I18n.locale] : page.i18n_variable[I18n.locale]}\n"
end
- def page_stylesheets(page)
+ def page_stylesheets(page, edit=nil)
stylesheets = ''
- stylesheets << "\n"
- stylesheets << "\n"
- stylesheets << "\n"
+ unless edit
+ stylesheets << "\n"
+ stylesheets << "\n"
+ stylesheets << "\n"
+ end
stylesheets << "\n" if page.design.reset_css
stylesheets << "\n" if page.design.default_css
theme = page.design.themes.detect{ |d| d.id == page.theme_id }
@@ -136,17 +138,19 @@ module ApplicationHelper
stylesheets
end
- def page_javascripts(page)
+ def page_javascripts(page, edit=nil)
javascripts = ''
- javascripts << "\n"
- javascripts << "\n"
+ unless edit
+ javascripts << "\n"
+ javascripts << "\n"
+ javascripts << "\n"
+ javascripts << "\n"
+ javascripts << "\n"
+ javascripts << "\n"
+ javascripts << "\n"
+ javascripts << "\n"
+ end
javascripts << "\n"
- javascripts << "\n"
- javascripts << "\n"
- javascripts << "\n"
- javascripts << "\n"
- javascripts << "\n"
- javascripts << "\n"
javascripts << "\n"
page.design.javascripts.each do |js|
# javascripts << ""
diff --git a/app/views/admin/ad_banners/_ad_banner_tab.html.erb b/app/views/admin/ad_banners/_ad_banner_tab.html.erb
index 76c55376..d2149f81 100644
--- a/app/views/admin/ad_banners/_ad_banner_tab.html.erb
+++ b/app/views/admin/ad_banners/_ad_banner_tab.html.erb
@@ -1,4 +1,4 @@
-" id=<%= ad_banner_tab.title %>>
+
" id=<%= ad_banner_tab.title.dehumanize %>>
<%= form_for ad_banner_tab,:url=> admin_ad_banner_path(ad_banner_tab),:method => :put,:class=>"input-medium" do |f| -%>
diff --git a/app/views/admin/ad_banners/_modal_preview.html.erb b/app/views/admin/ad_banners/_modal_preview.html.erb
index a79dc56e..ffc84107 100644
--- a/app/views/admin/ad_banners/_modal_preview.html.erb
+++ b/app/views/admin/ad_banners/_modal_preview.html.erb
@@ -8,7 +8,7 @@
<% preview_block_ad_images_helper(ad_banner).each do |ad_image| -%>
- <%= image_tag ad_image.file,:alt => (ad_image.title[locale] || " "),:time_to_next => ad_banner.transition_sec,:link_open=> ad_image.link_open, :link_url =>((ad_image.out_link || ad_banner.context || " ")) %>
+ <%= image_tag ad_image.file,:alt => (ad_image.title[locale] || " "),:time_to_next => ad_banner.transition_msec,:link_open=> ad_image.link_open, :link_url =>((ad_image.out_link || ad_banner.context || " ")) %>
<% end -%>
diff --git a/app/views/admin/ad_banners/_preview_block.html.erb b/app/views/admin/ad_banners/_preview_block.html.erb
index f71b3cd3..47646f6f 100644
--- a/app/views/admin/ad_banners/_preview_block.html.erb
+++ b/app/views/admin/ad_banners/_preview_block.html.erb
@@ -9,7 +9,7 @@
<% preview_block_ad_images_helper(ad_banner).each do |ad_image| -%>
- <%= image_tag ad_image.file,:alt => (ad_image.title[locale] || ' '),:time_to_next => ad_banner.transition_sec,:link_open=> ad_image.link_open, :link_url =>((ad_image.out_link || ad_banner.context || ' ')) %>
+ <%= image_tag ad_image.file,:alt => (ad_image.title[locale] || ' '),:time_to_next => ad_banner.transition_msec,:link_open=> ad_image.link_open, :link_url =>((ad_image.out_link || ad_banner.context || ' ')) %>
<% end -%>
diff --git a/app/views/admin/ad_banners/index.html.erb b/app/views/admin/ad_banners/index.html.erb
index 8307885a..9a5d438b 100644
--- a/app/views/admin/ad_banners/index.html.erb
+++ b/app/views/admin/ad_banners/index.html.erb
@@ -10,7 +10,7 @@
<% @ad_banners.each do |ab| %>
- <%= content_tag :li,link_to(ab.title,"##{ab.title}",:data=>{:toggle=>"tab"}),:class => (ab == @active ? 'active' : nil ) %>
+ <%= content_tag :li,link_to(ab.title,"##{ab.title.dehumanize}",:data=>{:toggle=>"tab"}),:class => (ab == @active ? 'active' : nil ) %>
<% end -%>
<%= content_tag :li,link_to(t("admin.ad.new_banner"),"#new-a-banner",:data=>{:toggle=>"tab"}),:id=>'new_ad_banner_tab_but',:class => (@active.nil? ? 'active' : nil ) %>
diff --git a/app/views/admin/ad_images/_form.html.erb b/app/views/admin/ad_images/_form.html.erb
index 6324675e..cd04b4fe 100644
--- a/app/views/admin/ad_images/_form.html.erb
+++ b/app/views/admin/ad_images/_form.html.erb
@@ -157,7 +157,7 @@
- <%= link_to t("modal.preview"), admin_realtime_preview_ad_banner_path(@ad_image.ad_banner.title) ,:class=>"preview_trigger btn btn-success" rescue nil%>
+ <%#= link_to t("modal.preview"), admin_realtime_preview_ad_banner_path(@ad_image.ad_banner.title) ,:class=>"preview_trigger btn btn-success" rescue nil%>
<%= f.submit t("submit"),:class=>"btn btn-primary" %>
<%= f.submit t("cancel"),:class=>"btn ",:type => 'reset' %>
diff --git a/app/views/admin/assets/_edit.html.erb b/app/views/admin/assets/_edit.html.erb
index 33f8131c..a747d4f2 100644
--- a/app/views/admin/assets/_edit.html.erb
+++ b/app/views/admin/assets/_edit.html.erb
@@ -9,7 +9,7 @@
<%= link_back %>
<%= f.submit t(:edit) %>
<% else %>
-
<%= t(:edit) %>
+
<%= t(:edit) %>
<% end %>
<% end %>
diff --git a/app/views/admin/assets/_new.html.erb b/app/views/admin/assets/_new.html.erb
index 49e638c8..85d3c2e5 100644
--- a/app/views/admin/assets/_new.html.erb
+++ b/app/views/admin/assets/_new.html.erb
@@ -9,7 +9,7 @@
<%= link_back %>
<%= f.submit t(:create) %>
<% else %>
-
<%= t(:create) %>
+
<%= t(:create) %>
<% end %>
<% end %>
diff --git a/app/views/admin/pages/_show.html.erb b/app/views/admin/pages/_show.html.erb
index ba9bcf48..29d532fb 100644
--- a/app/views/admin/pages/_show.html.erb
+++ b/app/views/admin/pages/_show.html.erb
@@ -1,7 +1,7 @@
<%= flash_messages %>
-<%= page_stylesheets(@item).html_safe %>
-<%= page_javascripts(@item).html_safe %>
+<%= page_stylesheets(@item, true).html_safe %>
+<%= page_javascripts(@item, true).html_safe %>
<%= parse_page_edit_noko(@item).html_safe %>
\ No newline at end of file
diff --git a/app/views/admin/pages/show.html.erb b/app/views/admin/pages/show.html.erb
index d6b6a8a2..3e1160c7 100644
--- a/app/views/admin/pages/show.html.erb
+++ b/app/views/admin/pages/show.html.erb
@@ -1,5 +1 @@
-<% content_for :sidebar do %>
- <%= render 'admin/items/site_map_left_bar' %>
-<% end -%>
-
<%= render 'show' %>
\ No newline at end of file
diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb
index e740fe7b..51a35bf9 100644
--- a/app/views/layouts/_side_bar.html.erb
+++ b/app/views/layouts/_side_bar.html.erb
@@ -33,8 +33,8 @@
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.ad_banner'), admin_ad_banners_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('ad_banners', 'ad_images')) do -%>
<%= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
- <%= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
- <%= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
+ <%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
+ <%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
<% end %>
<% end %>
diff --git a/app/views/layouts/site_editor.html.erb b/app/views/layouts/site_editor.html.erb
index e5ed9bb9..158c9f80 100644
--- a/app/views/layouts/site_editor.html.erb
+++ b/app/views/layouts/site_editor.html.erb
@@ -9,31 +9,30 @@
<%= stylesheet_link_tag "site_editor" %>
<%= javascript_include_tag "site_editor" %>
- <%= yield :page_specific_css %>
- <%= yield :page_specific_javascript %>
<%= csrf_meta_tag %>
-
+
+
+
+
-
<%= yield :sidebar %>
-
-
<%= yield :tertiary %>
-
+
-