import org.argeo.ArgeoException;
import org.argeo.cms.CmsException;
-import org.argeo.cms.CmsLink;
import org.argeo.cms.CmsTypes;
import org.argeo.cms.CmsUiProvider;
-import org.argeo.cms.CmsUtils;
import org.argeo.cms.text.Img;
+import org.argeo.cms.util.CmsLink;
+import org.argeo.cms.util.CmsUtils;
import org.argeo.cms.widgets.EditableImage;
import org.argeo.jcr.JcrUtils;
import org.eclipse.jface.viewers.ColumnLabelProvider;
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
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;
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
if (leaveOpened
&& (path.lastIndexOf("/") == 0
&& currNodePath.lastIndexOf("/") == 0 || JcrUtils
private String getPropAsString(Property property)
throws RepositoryException {
String result = "";
- DateFormat timeFormatter = new SimpleDateFormat("");
if (property.isMultiple()) {
result = getMultiAsString(property, ", ");
} else {
});
table.addKeyListener(new KeyListener() {
+ private static final long serialVersionUID = -330694313896036230L;
@Override
public void keyReleased(KeyEvent e) {
}
} else if (e.keyCode == SWT.ARROW_LEFT) {
try {
- String newPath = getNode().getParent()
- .getPath();
+ selected = getNode().getParent();
+ String newPath = selected.getPath(); // getNode().getParent()
+ setEdited(selected);
if (browserCols.containsKey(newPath))
browserCols.get(newPath).setFocus();
} catch (ItemNotFoundException ie) {