Browse Source

icons for download and close

Shawna 7 years ago
parent
commit
ab555483da

+ 10 - 0
tripal_ds/theme/css/tripaldsfeature.css

@@ -60,3 +60,13 @@
     padding: 0px 10px;
 }
 
+span.download-icon {
+    padding: 0px 10px;
+    float: right;
+    cursor: pointer;
+    margin: 0px 5px;
+    width: 25px;
+    border: none;
+}
+
+

+ 4 - 2
tripal_ds/theme/js/tripal_ds.js

@@ -5,7 +5,7 @@
 
       // Add a close button for each pane except for the te_base
       $('div.tripal_pane').each(function (i) {
-        $(this).prepend('<div class="tripal_pane-fieldset-close_button"><div id="tripal-pane-close-button" class="tripal-pane-button">[x]</div></div>');
+        $(this).prepend('<div class="tripal_pane-fieldset-close_button"><div id="tripal-pane-close-button" class="tripal-pane-button"><i class="fa fa-eye-slash fa-lg"></i></div></div><span class="download-icon"><i class="fa fa-download fa-lg" aria-hidden="true"></i></span>');
         var id = '.tripal_pane-fieldset-' + $(this).attr('id');
       });
       // Hide the pane when the close button is clicked
@@ -32,7 +32,9 @@
             // If the user clicks on other TOC item, move its fieldset to the top 
             $(id + ' fieldset').removeClass('collapsed');
             $(id + ' fieldset .fieldset-wrapper').show();
-            // Hightlight the fieldset instead of moving if it's already at the top
+            console.log(prevObj);
+            console.log(id);
+            // Highlight the fieldset instead of moving if it's already at the top
             if (prevObj.indexOf('group-tripal-pane-content-top') == 0) {
               $(id + ' fieldset').fadeTo(10, 0.3, function() {});
               $(id + ' fieldset').fadeTo(200, 1, function() {});

+ 3 - 0
tripal_ds/tripal_ds.module

@@ -11,6 +11,9 @@ function tripal_ds_init() {
 
   $theme_dir = url(drupal_get_path('module', 'tripal_ds') . '/theme');
   drupal_add_js("var ds_theme_dir  = '$theme_dir';", 'inline', 'header');
+  // Icon fonts.
+  drupal_add_css(drupal_get_path('module', 'tripal_ds') . '/theme/fonts/font-awesome-4.7.0/css/font-awesome.min.css');
+
 
 }