Fix structure edit
This commit is contained in:
parent
ba7ac5d954
commit
8456a91968
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
});
|
|
@ -6,12 +6,4 @@
|
|||
|
||||
<%= render 'layouts/delete_modal', delete_options: {remote: true} %>
|
||||
|
||||
<div id="view-page" class="nano" style="display:none">
|
||||
<div class="page-info clearfix">
|
||||
<a class="pull-right" href="javascript:$.pageslide.close()"><i class="icons-arrow-left-2"></i></a>
|
||||
<h3 class="page-name"></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
<%= javascript_include_tag "lib/jquery.pageslide.js" %>
|
||||
|
|
|
@ -9,12 +9,6 @@
|
|||
$('#app_page_url').html("<div class='well'><%= t('default_widget.no_support_setting')%></div>");
|
||||
<% end %>
|
||||
|
||||
<% if @app_frontend_urls.first =='default_widget' %>
|
||||
$('#app_page_frontend_style').html("<%= escape_javascript(select 'page', 'frontend_style', @selected[:module_app].widgets[@selected[:app_frontend_url]]) %>");
|
||||
<% else %>
|
||||
$('#app_page_frontend_style').html("<%= t('default_widget.no_support_setting')%>");
|
||||
<% end %>
|
||||
|
||||
<% if show_default_widget_setting_panel %>
|
||||
$('#app_page_tag').html("<%= j render :partial => 'admin/page_parts/widget_data_source_tag',:locals=>{:object=>@item} %>");
|
||||
|
||||
|
|
Loading…
Reference in New Issue