jqh 4 years ago
parent
commit
41d395d4d1

+ 2 - 2
resources/views/partials/navbar.blade.php

@@ -21,7 +21,7 @@
             @endif
 
             <div class="navbar-collapse d-flex justify-content-between">
-                <div class="d-flex align-items-center">
+                <div class="navbar-left d-flex align-items-center">
                     {!! Dcat\Admin\Admin::navbar()->render('left') !!}
                 </div>
 
@@ -37,7 +37,7 @@
                 </div>
                 @endif
 
-                <div class=" d-flex align-items-center">
+                <div class="navbar-right d-flex align-items-center">
                     {!! Dcat\Admin\Admin::navbar()->render() !!}
 
                     <ul class="nav navbar-nav">

+ 3 - 1
src/Widgets/Lazy.php

@@ -18,7 +18,9 @@ class Lazy extends Widget
         $this->setRenderable($renderable);
         $this->load($load);
 
-        $this->class(['lazy-box', $this->elementClass = 'lazy-'.Str::random(8)]);
+        $this->elementClass = 'lazy-'.Str::random(10);
+
+        $this->class(['lazy-box']);
     }
 
     /**

+ 3 - 1
src/Widgets/LazyTable.php

@@ -46,7 +46,9 @@ class LazyTable extends Widget
         $this->from($renderable);
         $this->load($load);
 
-        $this->class(['async-table', $this->elementClass = 'async-table-'.Str::random(8)]);
+        $this->elementClass = 'async-table-'.Str::random(10);
+
+        $this->class(['async-table']);
     }
 
     /**

+ 1 - 1
src/Widgets/Modal.php

@@ -74,7 +74,7 @@ class Modal extends Widget
      */
     public function __construct($title = null, $content = null)
     {
-        $this->id('modal-'.Str::random(8));
+        $this->id('modal-'.Str::random(10));
         $this->title($title);
         $this->content($content);
 

+ 2 - 0
src/Widgets/Widget.php

@@ -183,6 +183,8 @@ abstract class Widget implements Renderable
     {
         static::requireAssets();
 
+        $this->class($this->getElementClass(), true);
+
         $html = $this->html();
 
         $this->withScript();