                               ;;               :class "glyphicon glyphicon-remove"  :value "Delete"}]]
                               [:td  [:a {:href "javascript:;" :on-click #(delete(.-id dn))  :class "glyphicon glyphicon-remove"}] ]
 
-                              ])]]]
-      ]
-
-     ]
-
-    ]
+                              ])]]]]]]
    ;; [:div.padding]
    ;;  [:div.page-footer [:h4 "Copyright All Rights Reserved © 2016 TechnoIdentity Solutions Pvt.Ltd"]]
    ])
+(defn table-mount []
+  (.ready (js/$ js/document)
+          (fn []
+            (.DataTable (js/$ "#example1")))))
+(defn home [documents]
+  (r/create-class {:reagent-render render-documents
+                   :component-did-mount table-mount }))
+
 
 (defroute home-path "/" []
   (let [onres (fn [json]
                 ((reset! documents (getdata json))
-                 (r/render [render-documents @documents]
+                 (r/render [home @documents]
                            (.getElementById js/document "app1"))))]
     (http-get "http://localhost:8193/documents/all" onres)))
 

   [:div#dt (input "Date":Date :date)]
   [:div#loc (input "Location":text :location)]
   [:input {:type "button" :value "Save"
            :class "btn btn-primary" :on-click save}]
   ])

(defn get-update-documents-formdata []
  {

(defn http-get [url callback]
  (xhr/send url callback))

(defn http-post [url callback data]
  (xhr/send url callback "POST" data  (structs/Map. (clj->js {:Content-Type "application/json"}))))

