fixed the edit link problem in site settings

This commit is contained in:
Harry Bomrah 2013-11-05 16:47:44 +08:00 committed by saurabhbhatia
parent af103fa427
commit 9d7af2ccac
1 changed files with 4 additions and 3 deletions

View File

@ -81,7 +81,7 @@ function customOpenSlide() {
} else {
$('#pageslide form').prop('method', 'post')
};
_type == 'page' ? pageSetting(element.data('id'), _edit) : linkSetting(element.data('id'), _edit);
_type == 'page' ? pageSetting(element.data('id'), _edit) : linkSetting(element.data('id'), _edit, pageslide);
}
});
$iFrame.pageslide({
@ -237,8 +237,8 @@ function pageSetting(id, edit) {
};
};
function linkSetting(id, edit) {
$linkPublishedTrue = $('#link_is_published_true');
function linkSetting(id, edit, ps) {
$linkPublishedTrue = ps.find('#link_is_published_true');
_status = edit;
if(_status) {
$.ajax({
@ -250,6 +250,7 @@ function linkSetting(id, edit) {
})
.done(function(data) {
_linkData = data;
console.log($linkPublishedTrue)
data.public ? $linkPublishedTrue.prop('checked', true) : $linkPublishedTrue.prop('checked', false);
$linkPublishedTrue.prop('checked') ? $('.link-options').slideDown(300) : $('.link-options').slideUp(300);
$.each(_linkData.link, function(index, val) {