1 package com.sslexplorer.tasks; 2 3 import java.util.Locale ; 4 5 import javax.servlet.http.HttpSession ; 6 7 import org.apache.struts.Globals; 8 import org.apache.struts.util.MessageResources; 9 10 import com.sslexplorer.boot.Util; 11 import com.sslexplorer.core.CoreUtil; 12 13 public class TaskUtil { 14 15 public static String getTaskPath(String path, String bundle, String name, HttpSession session, int width, int height) { 16 MessageResources mr = CoreUtil.getMessageResources(session, bundle); 17 String title = mr == null ? "<Unknown>" : mr.getMessage((Locale )session.getAttribute(Globals.LOCALE_KEY), "taskProgress." + name + ".title"); 18 return "Modalbox.show('" + title + "', '/taskProgress.do?url=" + Util.urlEncode(path) + "&bundle=" + bundle + "&name=" 19 + name + "', { width: " + width + ", height: " + height + ", overlayClose: false }); return false;"; 20 } 21 22 } 23 | Popular Tags |