1 31 32 package org.opencms.workplace.list; 33 34 import org.opencms.i18n.CmsEncoder; 35 import org.opencms.workplace.CmsWorkplace; 36 37 46 public class CmsListPrintIAction extends A_CmsListIndependentJsAction { 47 48 49 public static final String LIST_ACTION_ID = "iap"; 50 51 54 public CmsListPrintIAction() { 55 56 super(LIST_ACTION_ID); 57 setName(Messages.get().container(Messages.GUI_LIST_ACTION_PRINT_NAME_0)); 58 setHelpText(Messages.get().container(Messages.GUI_LIST_ACTION_PRINT_HELP_0)); 59 setConfirmationMessage(Messages.get().container(Messages.GUI_LIST_ACTION_PRINT_CONF_0)); 60 setIconPath("list/print.png"); 61 setEnabled(true); 62 setVisible(true); 63 } 64 65 68 public String jsCode(CmsWorkplace wp) { 69 70 String url = wp.getJsp().link( 71 "/system/workplace/commons/list-print.jsp?" 72 + CmsListPrintDialog.PARAM_LISTCLASS 73 + "=" 74 + CmsEncoder.encode(wp.getClass().getName())); 75 String opts = "toolbar=no,location=no,directories=no,status=yes,menubar=0,scrollbars=yes,resizable=yes,top=50,left=50,width=700,height=500"; 76 StringBuffer js = new StringBuffer (512); 77 js.append("javascript:window.open('"); 78 js.append(url); 79 js.append("', 'opencmsprintlist', '"); 80 js.append(opts); 81 js.append("');"); 82 return js.toString(); 83 } 84 } 85 | Popular Tags |