Commits

Robert Massaioli [Atlassian] committed 93c4c4d

Attempting to make the UI more friendly.

Comments (0)

Files changed (3)

src/main/resources/atlassian-plugin.xml

     <!-- Active Objects Component Imports -->
     <component-import key="ao" name="Active Objects service"
                       interface="com.atlassian.activeobjects.external.ActiveObjects">
-        <description>Component to access Active Objects functionality from the plugin</description>
+        <description>Component to access Active Objects functionality from the plugin.</description>
     </component-import>
     <component key="tx-processor" name="Transactional Annotation Processor"
                class="com.atlassian.activeobjects.external.TransactionalAnnotationProcessor">

src/main/resources/js/set-ping.js

                 dataType:"json"
             }).done(function (json) {
                 console.log("TODO: give the user feedback that the ping was placed!");
+                AJS.messages.success("#status-messages", {
+	                title: "Created brand new ping.",
+	                body: "You can manage your pings here: <a href=\"" + AJS.contextPath() + "/secure/ViewMyPings!default.jspa\">My Pings</a>",
+	                closeable: true
+	            });
             }).fail(function (jqXHR, textStatus) {
                 console.log("TODO: let the user know that we failed to create the ping.");
+                AJS.messages.error("#status-messages", {
+	                title: "Could not create the ping.",
+	                body: "TODO why not?",
+	                closeable: true
+	            });
+            });
+        } else {
+        	AJS.messages.warning("#status-messages", {
+                title: "Date can not be understood.",
+                body: "You have attempted to create a Ping but we could not understand the format of the date and thus could not create your ping.",
+                closeable: true
             });
         }
     };

src/main/resources/templates/success.vm

 	        <p id="date-preview-container">
 	        	<strong>Preview:</strong> <span id="date-preview"></span>
 	        </p>
+	        <div id="status-messages"></div>
 	    </form>
     </body>
 </html>