jqh 5 سال پیش
والد
کامیت
44a98a8182
1فایلهای تغییر یافته به همراه5 افزوده شده و 8 حذف شده
  1. 5 8
      src/Grid/Column/Help.php

+ 5 - 8
src/Grid/Column/Help.php

@@ -42,11 +42,11 @@ class Help implements Renderable
      */
     public function render()
     {
-        $random = Str::random(8);
+        $class = 'grid-column-help-'.Str::random(8);
 
-        $tooltip = Tooltip::make('.grid-column-help-'.$random);
+        $tooltip = Tooltip::make('.'.$class);
 
-        if (in_array($this->style, ['green', 'blue', 'red', 'purple'])) {
+        if (in_array($this->style, ['primary', 'green', 'blue', 'red', 'purple'])) {
             $tooltip->{$this->style}();
         }
 
@@ -54,13 +54,10 @@ class Help implements Renderable
             $tooltip->{$this->placement}();
         }
 
-        $tooltip->content($this->message)
-            ->render();
+        $tooltip->content($this->message)->render();
 
         return <<<HELP
-<a href="javascript:void(0);" class="grid-column-help-{$random}" >
-    <i class="fa fa-question-circle"></i>
-</a>
+&nbsp;<a href="javascript:void(0);" class="{$class} fa fa-question-circle" ></a>
 HELP;
     }
 }