Add a cautionary note about enabling read-for-all access to a file.
authorpastith <devnull@localhost>
Fri, 13 Mar 2009 11:30:52 +0000 (11:30 +0000)
committerpastith <devnull@localhost>
Fri, 13 Mar 2009 11:30:52 +0000 (11:30 +0000)
gss/src/gr/ebs/gss/client/FilePropertiesDialog.java
gss/src/gr/ebs/gss/public/gss.css

index 6b41d16..f5d616d 100644 (file)
@@ -63,8 +63,7 @@ import com.google.gwt.user.client.ui.Widget;
 \r
 /**\r
  * The 'File properties' dialog box implementation.\r
- */\r
-/**\r
+ *\r
  * @author past\r
  */\r
 public class FilePropertiesDialog extends DialogBox {\r
@@ -112,11 +111,11 @@ public class FilePropertiesDialog extends DialogBox {
 \r
        private final CheckBox versioned = new CheckBox();\r
        final FileResource file;\r
+\r
        /**\r
         * The widget's constructor.\r
         *\r
         * @param images the dialog's ImageBundle\r
-        * @param permissions\r
         * @param groups\r
         * @param bodies\r
         */\r
@@ -264,8 +263,24 @@ public class FilePropertiesDialog extends DialogBox {
                permButtons.setSpacing(8);\r
                permButtons.addStyleName("gwt-TabPanelBottom");\r
 \r
+               final Label readForAllNote = new Label("By checking this option, the file will be readable" +\r
+                               " by everyone. You are responsible for ensuring that by doing so you do not " +\r
+                               "violate laws and statutes.", true);\r
+               readForAllNote.setVisible(false);\r
+               readForAllNote.setStylePrimaryName("gss-readForAllNote");\r
+\r
                readForAll = new CheckBox();\r
                readForAll.setChecked(file.isReadForAll());\r
+               readForAll.addClickListener(new ClickListener() {\r
+\r
+                       public void onClick(Widget sender) {\r
+                               if (readForAll.isChecked())\r
+                                       readForAllNote.setVisible(true);\r
+                               else\r
+                                       readForAllNote.setVisible(false);\r
+                       }\r
+\r
+               });\r
                permForAll.add(new Label("Read For All:"));\r
                permForAll.add(readForAll);\r
                permForAll.setSpacing(8);\r
@@ -273,6 +288,7 @@ public class FilePropertiesDialog extends DialogBox {
                permPanel.add(permList);\r
                permPanel.add(permButtons);\r
                permPanel.add(permForAll);\r
+               permPanel.add(readForAllNote);\r
 \r
                VersionsList verList = new VersionsList(this, images, bodies);\r
                verPanel.add(verList);\r
index d23ef6b..f747ed3 100644 (file)
@@ -396,6 +396,13 @@ a:visited {
        background-repeat: no-repeat;
 }
 
+.gss-readForAllNote {
+       width: 240px;
+       text-align: justify;
+       font-style: italic;
+       font-size: 12px;
+}
+
 .gwt-SuggestBox {
        padding: 2px;
 }