import java.util.Set;\r
\r
import com.google.gwt.core.client.GWT;\r
+import com.google.gwt.event.dom.client.ChangeEvent;\r
+import com.google.gwt.event.dom.client.ChangeHandler;\r
import com.google.gwt.event.dom.client.ClickEvent;\r
import com.google.gwt.event.dom.client.ClickHandler;\r
import com.google.gwt.event.dom.client.KeyDownEvent;\r
final HorizontalPanel vPanel2 = new HorizontalPanel();\r
\r
versioned.setValue(file.isVersioned());\r
+ versioned.getElement().setId("filePropertiesDialog.chechBox.versioned");\r
inner.add(generalPanel, "General");\r
inner.add(permPanel, "Sharing");\r
inner.add(verPanel, "Versions");\r
generalTable.setText(4, 0, "Tags");\r
name.setWidth("100%");\r
name.setText(file.getName());\r
+ name.getElement().setId("filePropertiesDialog.textBox.name");\r
generalTable.setWidget(0, 1, name);\r
- name.addKeyDownHandler(new KeyDownHandler() {\r
+ name.addChangeHandler(new ChangeHandler() {\r
\r
@Override\r
- public void onKeyDown(KeyDownEvent event) {\r
- fileNameNote.setVisible(true);\r
+ public void onChange(ChangeEvent event) {\r
+ if(name.getText().contains("/"))\r
+ fileNameNote.setVisible(true);\r
+ else\r
+ fileNameNote.setVisible(false);\r
\r
}\r
});\r
tagsBuffer.delete(tagsBuffer.length() - 2, tagsBuffer.length() - 1);\r
initialTagText = tagsBuffer.toString();\r
tags.setWidth("100%");\r
+ tags.getElement().setId("filePropertiesDialog.textBox.tags");\r
tags.setText(initialTagText);\r
generalTable.setWidget(4, 1, tags);\r
generalTable.getFlexCellFormatter().setStyleName(0, 0, "props-labels");\r
final Button ok = new Button("OK", new ClickHandler() {\r
@Override\r
public void onClick(ClickEvent event) {\r
- accept();\r
- closeDialog();\r
+ if(name.getText().contains("/"))\r
+ fileNameNote.setVisible(true);\r
+ else{\r
+ fileNameNote.setVisible(true);\r
+ accept();\r
+ closeDialog();\r
+ } \r
}\r
});\r
+ ok.getElement().setId("filePropertiesDialog.button.ok"); \r
buttons.add(ok);\r
buttons.setCellHorizontalAlignment(ok, HasHorizontalAlignment.ALIGN_CENTER);\r
// Create the 'Cancel' button, along with a listener that hides the\r
closeDialog();\r
}\r
});\r
+ cancel.getElement().setId("filePropertiesDialog.button.cancel");\r
buttons.add(cancel);\r
buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);\r
buttons.setSpacing(8);\r
dlg.center();\r
}\r
});\r
+ add.getElement().setId("filePropertiesDialog.button.addGroup");\r
permButtons.add(add);\r
permButtons.setCellHorizontalAlignment(add, HasHorizontalAlignment.ALIGN_CENTER);\r
\r
dlg.center();\r
}\r
});\r
+ add.getElement().setId("filePropertiesDialog.button.addUser");\r
permButtons.add(addUser);\r
permButtons.setCellHorizontalAlignment(addUser, HasHorizontalAlignment.ALIGN_CENTER);\r
\r
readForAllNote.setStylePrimaryName("gss-readForAllNote");\r
\r
readForAll = new CheckBox();\r
+ readForAll.getElement().setId("filePropertiesDialog.checkBox.public");\r
readForAll.setValue(file.isReadForAll());\r
readForAll.addClickHandler(new ClickHandler() {\r
@Override\r
\r
});\r
path.setText(file.getUri());\r
+ path.getElement().setId("filePropertiesDialog.textBox.link");\r
path.setTitle("Use this link for sharing the file via e-mail, IM, etc. (crtl-C/cmd-C to copy to system clipboard)");\r
path.setWidth("100%");\r
path.setReadOnly(true);\r