Commits

Anonymous committed 530557c

- tart up the UI some more

Comments (0)

Files changed (3)

src/main/resources/plugin-data-editor.css

 
 #recent-lookups-container {
     width: 500px;
+}
+
+.pluginsettings-key {
+    font-weight: bold;
+}
+
+.pluginsettings-value {
+    font-family: "Lucida Console", "Courier New", monospace;
+}
+
+#lookup-result-container {
+    display: none;
+    background: #FEFBF3;
+    border: 1px solid;
+    font-family: "Lucida Console", "Courier New", monospace;
+    border-radius: 3px;
+    -moz-border-radius: 3px;
+    -webkit-border-radius: 3px;
+    margin-top: 10px;
+    padding: 9px;
+    max-width: 900px;
+    overflow: auto;
 }

src/main/resources/plugin-data-editor.js

     this.value = value;
     this.settingsKey = settingsKey || '';
 
-    this.displayKeysHtml = '<span id="data-key-result">' + dataKey + '</span>' +
+    this.displayKeysHtml = '<span id="data-key-result" class="pluginsettings-key">' + dataKey + '</span>' +
                            ((settingsKey && settingsKey != '') ? ' (in <span id="settings-key-result">' + settingsKey + '</span>)' : '');
     this.displayKeysNonHtml = dataKey + ((settingsKey && settingsKey != '') ? ' (in ' + settingsKey + ')' : '');
 }
     if (historySize >= 5) {
         AJS.$('li:last', lookupList).remove();
     }
-    lookupList.prepend('<li>' + lookupResult.displayKeysNonHtml + ' = ' + lookupResult.value
-            + ' (<a href="#" onClick="redoLookup(\''+ lookupResult.dataKey + '\', \'' + lookupResult.settingsKey + '\');return true">redo</a>)</li>');
+    lookupList.prepend('<li><span class="pluginsettings-key">' + lookupResult.displayKeysNonHtml + '</span><br><span class="pluginsettings-value">' + lookupResult.value
+            + '</span> (<a href="#" onClick="redoLookup(\''+ lookupResult.dataKey + '\', \'' + lookupResult.settingsKey + '\');return true">redo</a>)</li>');
 }
 
 function showResult(lookupResult)
     var dataKeysElement = AJS.$('#data-keys');
     var dataKeyElement = AJS.$('#data-key-result');
     var settingsKeyElement = AJS.$('#settings-key-result');
-    var dataValElement = AJS.$('#data-value');
     var redoButton = AJS.$('#data-redo-last');
+    var container = AJS.$("#lookup-result-container");
     
-    var prevLookupResult = new LookupResult(dataKeyElement.html(), dataValElement.html(), settingsKeyElement ? settingsKeyElement.html() : '');
+    var prevLookupResult = new LookupResult(dataKeyElement.html(), container.html(), settingsKeyElement ? settingsKeyElement.html() : '');
 
     dataKeysElement.hide().html(lookupResult.displayKeysHtml);
-    dataValElement.hide().html(lookupResult.value);
+    container.html(lookupResult.value);
     redoButton.attr("onClick","redoLookup('" + lookupResult.dataKey + "','" + lookupResult.settingsKey + "');return true");
 
     // animate back with the new results
     dataKeysElement.fadeIn();
-    dataValElement.fadeIn();
+    container.fadeIn();
     redoButton.fadeIn();
 
     addToRecentLookupsList(prevLookupResult);
                 var resultText;
                 if (status === 'error' || !xhr.responseText) {
                     if (xhr.status === 404) {
-                        resultText = '<i>Value for key not found</i>';
+                        resultText = '<i>No value found.</i>';
                     } else {
                         resultText = '<i>Uh oh, something went wrong</i>';
                     }

src/main/resources/plugin-data-editor.vm

 
     <h2>Results</h2>
 
-    <div id="data-keys">
-        <span id="data-key-result"><i>No lookups yet.</i></span>
-        <span id="settings-key-result"></span>
+    <div class="field-group">
+        <div id="data-keys">
+            <span id="data-key-result"><i>No lookups yet.</i></span>
+            <span id="settings-key-result"></span>
+        </div>
+
+        <div id="lookup-result-container">
+        </div>
     </div>
 
-    <span id="data-value"></span>
+    <div class="field-group">
+        <input type="button" class="button" id="data-redo-last" value="Redo lookup">
 
-    <div class="field-group">
-        <input type="button" id="data-redo-last" value="Redo lookup">
+        <div id="recent-lookups-container">
+            <h3>Recent Lookups</h3>
+            <div class="description">Note: Lookup history is not persistent and will not survive a page refresh.</div>
+            <ul id="recent-lookups"></ul>
+
+        </div>
     </div>
-
-    <div id="recent-lookups-container">
-        <div class="aui-message info closeable shadowed">
-            <p class="title">
-                <span class="aui-icon icon-info"></span>
-                <strong>Lookup history is not persistent.</strong>
-            </p>
-            <p>This information will not survive a page refresh.</p>
-        </div>
-        <ul id="recent-lookups"></ul>
-        
-    </div>
-    
 </form>
 
 </body>