]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.cms/src/org/argeo/cms/maintenance/Browse.java
Move auth related widgets to CMS
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / maintenance / Browse.java
index e3561e104777b9be7e26107c3c153060a2c5f044..c6dd755f0f8c3b0531310160eecd4f7e03932e8d 100644 (file)
@@ -57,9 +57,11 @@ import org.eclipse.swt.widgets.Text;
 public class Browse implements CmsUiProvider {
 
        // Some local constants to experiment. should be cleaned
-       private final static String BROWSE_PREFIX = "#browse";
+       private final static String BROWSE_PREFIX = "browse#";
        private final static int THUMBNAIL_WIDTH = 400;
        private final static int COLUMN_WIDTH = 160;
+       private DateFormat timeFormatter = new SimpleDateFormat(
+                       "dd-MM-yyyy', 'HH:mm");
 
        // keep a cache of the opened nodes
        // Key is the path
@@ -77,6 +79,7 @@ public class Browse implements CmsUiProvider {
        public Control createUi(Composite parent, Node context)
                        throws RepositoryException {
                if (context == null)
+                       // return null;
                        throw new CmsException("Context cannot be null");
                GridLayout layout = CmsUtils.noSpaceGridLayout();
                layout.numColumns = 2;
@@ -264,7 +267,8 @@ public class Browse implements CmsUiProvider {
                                boolean leaveOpened = path.startsWith(currNodePath);
 
                                // workaround for same name siblings
-                               // fix me weird side effect when we go left or click on anb already selected, unfocused node
+                               // fix me weird side effect when we go left or click on anb
+                               // already selected, unfocused node
                                if (leaveOpened
                                                && (path.lastIndexOf("/") == 0
                                                                && currNodePath.lastIndexOf("/") == 0 || JcrUtils
@@ -373,7 +377,6 @@ public class Browse implements CmsUiProvider {
        private String getPropAsString(Property property)
                        throws RepositoryException {
                String result = "";
-               DateFormat timeFormatter = new SimpleDateFormat("");
                if (property.isMultiple()) {
                        result = getMultiAsString(property, ", ");
                } else {
@@ -529,7 +532,7 @@ public class Browse implements CmsUiProvider {
                                                } else if (e.keyCode == SWT.ARROW_LEFT) {
                                                        try {
                                                                selected = getNode().getParent();
-                                                               String newPath = selected.getPath(); //getNode().getParent()
+                                                               String newPath = selected.getPath(); // getNode().getParent()
                                                                setEdited(selected);
                                                                if (browserCols.containsKey(newPath))
                                                                        browserCols.get(newPath).setFocus();