diff --git a/app/assets/javascripts/basic/orbit_js_1.0.1.js b/app/assets/javascripts/basic/orbit_js_1.0.1.js index 35c8b13c..49b8a141 100644 --- a/app/assets/javascripts/basic/orbit_js_1.0.1.js +++ b/app/assets/javascripts/basic/orbit_js_1.0.1.js @@ -506,7 +506,7 @@ function openSlide() { if($('.item-groups').length) { $os = $openSlide.not('.view-page'); $vp = $openSlide.filter('.view-page.open-slide'); - $os.pageslide({ W: 324 }); + $os.pageslide({ W: 624 }); $vp.pageslide({ W: $pageslideW, iframe: true }); } else { $openSlide.pageslide(); diff --git a/app/assets/javascripts/lib/items/page_widget_edit_interface.js b/app/assets/javascripts/lib/items/page_widget_edit_interface.js index d46da5fa..53c99e2f 100644 --- a/app/assets/javascripts/lib/items/page_widget_edit_interface.js +++ b/app/assets/javascripts/lib/items/page_widget_edit_interface.js @@ -7,32 +7,29 @@ function append_id(){ }; } -$("div.editable").live("mouseenter mouseleave", function (event) { - $(this).children('.edit_link').toggle(); +$(document).on('change', 'select', function(e) { + if(!e.target.className == 'widget_field_select') { + switch(e.target.id) { + case 'page_module_app_id': + $.getScript($(this).attr('rel') + '?module_app_id='+$(this).val() + append_id()); + break; + case 'page_app_frontend_url': + case 'page_part_widget_path': + $.getScript($(this).attr('rel') +'?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() + append_id() ); + break; + case 'page_design': + $.getScript($(this).attr('rel') + '?design_id=' + $(this).val() + append_id()); + break; + case 'page_part_public_r_tag': + $.getScript($(this).attr('rel') + '?type=' + $(this).val() + append_id()); + break; + }; + } else { + $.getScript($(this).attr('rel') + '?widget_field_value='+ $(this).val()+'&dom_id=' + $(this).attr("id") + '&field_seri=' +$(this).attr('field_seri')+ '&module_app_id=' +$("#page_module_app_id,page_part_module_app_id").val() + append_id() ); + } }); -$("#page_design").live('change', function() { - $.getScript($(this).attr('rel') + '?design_id=' + $(this).val() + append_id()); -}); - - -$("#module_app_list select").live('change', function() { - $.getScript($(this).attr('rel') + '?module_app_id='+$(this).val() + append_id()); -}); - -$("#widget_list select, #frontend_list select").live('change', function() { - $.getScript($(this).attr('rel') +'?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() + append_id() ); -}); - -$("#tag_list select").live('change', function() { - $.getScript($(this).attr('rel') + '?type=' + $(this).val() + append_id() ); -}); - -$("select.widget_field_select").live('change', function() { - $.getScript($(this).attr('rel') + '?widget_field_value='+ $(this).val()+'&dom_id=' + $(this).attr("id") + '&field_seri=' +$(this).attr('field_seri')+ '&module_app_id=' +$("#page_module_app_id,page_part_module_app_id").val() + append_id() ); -}); - -$('.part_kind').live('click', function() { +$(document).on('click', '.part_kind', function(event) { $('.part_kind_partial').hide(); $('#part_' + $(this).attr('value')).show(); -}); +}); \ No newline at end of file diff --git a/app/views/admin/items/index.html.erb b/app/views/admin/items/index.html.erb index b78f045c..c5387e01 100644 --- a/app/views/admin/items/index.html.erb +++ b/app/views/admin/items/index.html.erb @@ -6,12 +6,4 @@ <%= render 'layouts/delete_modal', delete_options: {remote: true} %> -
<%= javascript_include_tag "lib/jquery.pageslide.js" %> diff --git a/app/views/admin/pages/reload_frontend_pages.js.erb b/app/views/admin/pages/reload_frontend_pages.js.erb index 9672adfa..f81d5ad4 100644 --- a/app/views/admin/pages/reload_frontend_pages.js.erb +++ b/app/views/admin/pages/reload_frontend_pages.js.erb @@ -9,12 +9,6 @@ $('#app_page_url').html("