Browse Source

Update dashboard tools

Denis K 8 years ago
parent
commit
9b5580e7dd

+ 2 - 2
jet/dashboard/templates/jet.dashboard/dashboard_tools.html

@@ -15,10 +15,10 @@
                     <option value="{{ forloop.counter0 }}" data-type="children">{{ module.title }}</option>
                 {% endfor %}
             </optgroup>
-        </select><a href="#" class="button add-dashboard-link" title="{% trans "Add" %}"><span class="icon-add"></span></a>
+        </select><a href="#" class="button add-dashboard-link" title="{% trans "Add" %}"><span class="icon-add"></span><span class="add-dashboard-link-label">{% trans "Add" %}</span></a>
         <input type="hidden" name="app_label" value="{% if app_label %}{{ app_label }}{% endif %}">
         <input type="hidden" name="type" value="">
-        <a href="#" class="button transparent reset-dashboard-link" title="{% trans "Reset widgets" %}"><span class="icon-reset"></span></a>
+        <a href="#" class="button transparent reset-dashboard-link" title="{% trans "Reset widgets" %}"><span class="icon-reset"></span><span class="reset-dashboard-link-label">{% trans "Reset widgets" %}</span></a>
     </form>
     <form action="{% url "jet-dashboard:reset_dashboard" %}" method="POST" id="reset-dashboard-form">
         {% csrf_token %}

+ 39 - 3
jet/static/jet/css/_dashboard.scss

@@ -94,11 +94,11 @@ ul.actionlist li {
 
     @include for-mobile {
       position: static;
-      margin: 20px 20px 0 20px;
+      margin: 20px;
     }
 
     @include for-phone {
-      margin: 10px 10px 0 10px;
+      margin: 20px 10px;
     }
 
     .button {
@@ -373,14 +373,50 @@ ul.actionlist li {
   + .select2 {
     background-color: transparent;
 
+    @include for-phone {
+      width: 100% !important;
+      margin-bottom: 5px;
+    }
+
     .select2-selection {
       border-radius: 4px 0 0 4px !important;
       border: 0;
+
+      @include for-phone {
+        border-radius: 4px !important;
+      }
     }
   }
 
   &-link {
     border-radius: 0 4px 4px 0 !important;
     padding: 0 10px !important;
+
+    @include for-phone {
+      border-radius: 4px !important;
+      margin-right: 5px;
+    }
+
+    &-label {
+      display: none;
+      vertical-align: middle;
+      margin-left: 4px;
+
+      @include for-phone {
+        display: inline;
+      }
+    }
   }
-}
+}
+
+.reset-dashboard-link {
+  &-label {
+    display: none;
+    vertical-align: middle;
+    margin-left: 6px;
+
+    @include for-phone {
+      display: inline;
+    }
+  }
+}