iFrame ajaxStop
This commit is contained in:
parent
16659d79cd
commit
454e36b4ae
|
@ -116,20 +116,23 @@ function customOpenSlide() {
|
|||
});
|
||||
}
|
||||
function iFrameContent() {
|
||||
$('#pageslide_iframe').load(function() {
|
||||
var $iContents = $(this).contents(),
|
||||
$pc = $iContents.find('.page_content');
|
||||
$pc.each(function(index, el) {
|
||||
function iFrameFunction(iContents, pc) {
|
||||
pc.each(function(index, el) {
|
||||
if($(this).siblings('*').length == 0) {
|
||||
var _parentH = $(this).parent('*').outerHeight();
|
||||
$(this).css('height', _parentH);
|
||||
}
|
||||
});
|
||||
$iContents.find('#orbit-bar').hide();
|
||||
$iContents.find('.main_wrap').css('margin-top', 0);
|
||||
$iContents.find('a').not('.edit_link a').on('click', function(event) {
|
||||
iContents.find('#orbit-bar').hide();
|
||||
iContents.find('.main_wrap').css('margin-top', 0);
|
||||
iContents.find('a').not('.edit_link a').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
}).css('cursor', 'default');
|
||||
}
|
||||
$('#pageslide_iframe').load(function() {
|
||||
var $iContents = $(this).contents(),
|
||||
$pc = $iContents.find('.page_content');
|
||||
$(this).get(0).contentWindow.externalFunction(iFrameFunction, $iContents, $pc);
|
||||
});
|
||||
}
|
||||
function pageSetting(id, edit) {
|
||||
|
@ -375,7 +378,6 @@ $(function() {
|
|||
if(_val) {
|
||||
$.each(_data, function(index, val) {
|
||||
if(_val == val.main[1]) {
|
||||
getView(val.main[1]);
|
||||
$.each(val.sub, function(index, val) {
|
||||
var _selected = _select && $(this)[1] == _select.sub ? 'selected="selected"' : '';
|
||||
$subSelete.append('<option value="' + $(this)[1] + '" ' + _selected.sub + '>' + $(this)[0] + '</option>');
|
||||
|
@ -383,6 +385,7 @@ $(function() {
|
|||
$.each(val.count, function(index, val) {
|
||||
$pageCount.append('<option value="' + val + '" ' + (_select && _select.main == _val && val == _selectData.module.count ? 'selected="selected"' : '') + '>' + val+ '</option>');
|
||||
});
|
||||
getView(val.main[1]);
|
||||
$pageDivCount.show();
|
||||
|
||||
if(event.target.id == 'page_module_app_id') {
|
||||
|
|
|
@ -46,7 +46,6 @@ $(function() {
|
|||
if(_val) {
|
||||
$.each(_data, function(index, val) {
|
||||
if(_val == val.main[1]) {
|
||||
getView(val.main[1]);
|
||||
$.each(val.sub, function(index, val) {
|
||||
var _selected = _select && $(this)[1] == _select.sub ? 'selected="selected"' : '';
|
||||
$subSelete.append('<option value="' + $(this)[1] + '" ' + _selected.sub + '>' + $(this)[0] + '</option>');
|
||||
|
@ -54,6 +53,7 @@ $(function() {
|
|||
$.each(val.count, function(index, val) {
|
||||
$pageCount.append('<option value="' + val + '" ' + (_select && _select.main == _val && val == _selectData.module.count ? 'selected="selected"' : '') + '>' + val+ '</option>');
|
||||
});
|
||||
getView(val.main[1]);
|
||||
|
||||
if(event.target.id == 'page_part_module_app') {
|
||||
$pageCategory.empty();
|
||||
|
|
|
@ -29,12 +29,11 @@
|
|||
<% end -%>
|
||||
<% if @edit %>
|
||||
<script>
|
||||
function externalFunction(Fn, iContents, pc) {
|
||||
$(document).ajaxStop(function() {
|
||||
$('a').not('.backend_edit').on('click', function(e){
|
||||
e.preventDefault();
|
||||
});
|
||||
$('a').not('.backend_edit').css("cursor", "default");
|
||||
Fn(iContents, pc);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.body {
|
||||
|
|
Reference in New Issue