mirror of https://github.com/zlatinb/muwire
require collection name
parent
45b53cdcaa
commit
9f488a465d
|
@ -36,6 +36,11 @@ class CollectionWizardController {
|
||||||
void review() {
|
void review() {
|
||||||
model.timestamp = System.currentTimeMillis()
|
model.timestamp = System.currentTimeMillis()
|
||||||
model.root = view.nameTextField.text
|
model.root = view.nameTextField.text
|
||||||
|
if (model.root == null || model.root.trim().length() == 0) {
|
||||||
|
view.warnMissingName()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
model.root = model.root.trim()
|
||||||
model.comment = view.commentTextArea.text
|
model.comment = view.commentTextArea.text
|
||||||
if (model.comment == null)
|
if (model.comment == null)
|
||||||
model.comment = ""
|
model.comment = ""
|
||||||
|
|
|
@ -535,6 +535,8 @@ COLLECTION_DESCRIPTION=Enter description for this collection
|
||||||
COLLECTION_TOTAL_FILES=Number of files
|
COLLECTION_TOTAL_FILES=Number of files
|
||||||
COLLECTION_TOTAL_SIZE=Total size
|
COLLECTION_TOTAL_SIZE=Total size
|
||||||
COLLECTION_REVIEW_TITLE=This is what the collection will look like
|
COLLECTION_REVIEW_TITLE=This is what the collection will look like
|
||||||
|
COLLECTION_NAME_WARNING=The collection name cannot be blank. Please select a name for this collection.
|
||||||
|
COLLECTION_NAME_WARNING_TITLE=Missing collection name
|
||||||
|
|
||||||
## Collections tool
|
## Collections tool
|
||||||
COLLECTION_TOOL_TITLE=Collections in your repository
|
COLLECTION_TOOL_TITLE=Collections in your repository
|
||||||
|
|
|
@ -12,6 +12,7 @@ import griffon.metadata.ArtifactProviderFor
|
||||||
import net.i2p.data.DataHelper
|
import net.i2p.data.DataHelper
|
||||||
|
|
||||||
import javax.swing.JDialog
|
import javax.swing.JDialog
|
||||||
|
import javax.swing.JOptionPane
|
||||||
import javax.swing.JTree
|
import javax.swing.JTree
|
||||||
import javax.swing.SwingConstants
|
import javax.swing.SwingConstants
|
||||||
import javax.swing.border.TitledBorder
|
import javax.swing.border.TitledBorder
|
||||||
|
@ -108,6 +109,11 @@ class CollectionWizardView {
|
||||||
mainPanel.getLayout().show(mainPanel, "configuration")
|
mainPanel.getLayout().show(mainPanel, "configuration")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void warnMissingName() {
|
||||||
|
JOptionPane.showMessageDialog(dialog, trans("COLLECTION_NAME_WARNING"),
|
||||||
|
trans("COLLECTION_NAME_WARNING_TITLE"), JOptionPane.WARNING_MESSAGE)
|
||||||
|
}
|
||||||
|
|
||||||
void mvcGroupInit(Map<String,String> args) {
|
void mvcGroupInit(Map<String,String> args) {
|
||||||
filesTable.setDefaultRenderer(Long.class, new SizeRenderer())
|
filesTable.setDefaultRenderer(Long.class, new SizeRenderer())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue