                         }}))))
 
 
-
-
-
-
-
-
-
-
-
-(def thumbinal-edit-form-app-init
+;; END Edit form functional
+;;..................................................................................................
+
+;;**************************************************************************************************
+;;* BEGIN Thumbs
+;;* tag: <thumbs>
+;;*
+;;* description: Функционал работы с тумбами и картинками
+;;*
+;;**************************************************************************************************
+
+
+(def thumbnail-app-init
+  {:id nil
+   :path nil
+   :top_description nil
+   :description nil
+   :galleria false
+   })
+
+
+(defn thumbnail [app _ {:keys [class+
+                               onClick-fn]
+                        :or {class+ "col-xs-6 col-sm-4 col-md-4 col-lg-4"}}]
+  (reify
+    om/IRender
+    (render [_]
+      (let [{:keys [id path top_description description galleria] :as row} app]
+        (dom/div
+         #js {:className class+}
+         (dom/div
+          #js {:className "thumbnail"
+               :onClick (fn [e]
+                          (when onClick-fn (onClick-fn e id)))
+               :style #js {:cursor "pointer"}}
+          (when galleria
+            (dom/span #js {:className "glyphicon glyphicon-film"
+                           :style #js {:position "absolute"
+                                       :top 10 :left 5
+                                       :fontSize "2em"}
+                           :aria-hidden "true"}))
+          (dom/a nil (dom/img #js {:src path :alt "фото"}))
+          (dom/div #js {:className "caption"}
+                   (when (not (clojure.string/blank? top_description))
+                     (dom/h3 nil top_description))
+                   (dom/div nil
+                            (when (not (clojure.string/blank? description))
+                              (dom/p nil description))
+
+                            (dom/span #js {:className "label label-default"} "URL")
+                            " "
+                            (dom/input #js {:type "text"
+                                            :style #js {:width "70%" :fontSize "0.7em"}
+                                            :value path
+                                            :onMouseDown (fn [e] (.select (.-target e)))
+                                            }))
+                   )))))))
+
+
+(def thumbnails-edit-form-app-init
   (merge edit-form-for-id-app-init
          {:top_description input-app-init
           :description textarea-app-init

            ))



(def modal-app-init
  {:show false})

;;                                 (om/set-state! owner :value new-value)))})))))




;; END has
;;..................................................................................................

;;**************************************************************************************************
;;* BEGIN input
;;* tag: <input>
;;*
;;* description: поле ввода
;;*
;;**************************************************************************************************

(def input-app-init
  {:value ""})

