Liferay.LayoutExporter = {
all: function(options) {
options = options || {};
var pane = options.pane;
var obj = options.obj;
var publish = options.publish;
if (obj.checked) {
jQuery(pane).hide();
if (!publish) {
jQuery('#publishBtn').show();
jQuery('#selectBtn').hide();
}
else {
jQuery('#changeBtn').hide();
}
}
},
details: function(options) {
options = options || {};
var toggle = options.toggle;
var detail = options.detail;
var img = jQuery(toggle)[0];
if (jQuery(detail).css('display') == 'none') {
jQuery(detail).slideDown('normal');
img.src = Liferay.LayoutExporter.icons.minus;
}
else {
jQuery(detail).slideUp('normal');
img.src = Liferay.LayoutExporter.icons.plus;
}
},
icons: {
minus: themeDisplay.getPathThemeImages() + '/arrows/01_minus.png',
plus: themeDisplay.getPathThemeImages() + '/arrows/01_plus.png'
},
publishToLive: function(options) {
options = options || {};
var messageId = options.messageId;
var url = options.url;
var title = options.title;
if (!title) {
title = Liferay.Language.get(messageId);
}
var exportLayoutsPopup = Liferay.Popup(
{
'title': title,
modal: true,
width: 600,
height: 550,
overflow: "auto",
'messageId': messageId
}
);
AjaxUtil.update(url, exportLayoutsPopup);
},
selected: function(options) {
options = options || {};
var pane = options.pane;
var obj = options.obj;
var publish = options.publish;
if (obj.checked) {
jQuery(pane).show();
if (!publish) {
jQuery('#publishBtn').hide();
jQuery('#selectBtn').show();
}
else {
jQuery('#changeBtn').show();
}
}
}
};