summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/service/resume-service.lisp10
-rw-r--r--lisp/webapps/resume/clojurescript/resume/src/resume/core.clj155
-rw-r--r--lisp/webapps/resume/clojurescript/resume/src/resume/core.cljs2
3 files changed, 83 insertions, 84 deletions
diff --git a/lisp/service/resume-service.lisp b/lisp/service/resume-service.lisp
index 59643c5..fca6c6e 100644
--- a/lisp/service/resume-service.lisp
+++ b/lisp/service/resume-service.lisp
@@ -305,7 +305,7 @@ needs to JOIN with other data."
(:name "email" :label "Email" :field-type "text" :value ,(email contactinfo) :required "required")
(:name "url" :label "URL" :field-type "text" :value ,(url contactinfo))
(:name "visastatus_id" :label "VISA Status" :field-type "select" :value (visastatus_id contactinfo) :options ,(visastatus-options (get-records resume-pkg (make-instance 'visastatus) "visastatus asc")) :required "required")
- (:label "Modify CONTACTINFO" :field-type "button" :onclick ,(format nil "on_contactinfo_modify_submit_clicked(~a)" id)))
+ (:label "Modify CONTACTINFO" :field-type "button" :onclick "on_contactinfo_modify_submit_clicked()"))
"state_abbr asc, city asc, address asc"
t))
@@ -327,7 +327,7 @@ needs to JOIN with other data."
(:name "progress" :label "Progress" :field-type "text" :value ,(progress education) :required "required")
(:name "start_date" :label "Start Date" :field-type "text" :value ,(start_date education) :required "required")
(:name "end_date" :label "End Date" :field-type "text" :value ,(end_date education) :required "required")
- (:label "Modify EDUCATION" :field-type "button" :onclick ,(format nil "on_education_modify_submit_clicked(~a)" id)))
+ (:label "Modify EDUCATION" :field-type "button" :onclick "on_education_modify_submit_clicked()"))
"end_date desc, start_date desc, school asc, degree asc, major asc, minor asc"))
(define-resume-component (language
@@ -346,7 +346,7 @@ needs to JOIN with other data."
(:name "speaking_interaction" :label "Speaking Interaction" :field-type "select" :options ,(language-options) :value ,(speaking_interaction language) :required "required")
(:name "speaking_production" :label "Speaking Production" :field-type "select" :options ,(language-options) :value ,(speaking_production language) :required "required")
(:name "writing" :label "Writing" :field-type "select" :options ,(language-options) :value ,(writing language) :required "required")
- (:label "Modify LANGUAGE" :field-type "button" :onclick ,(format nil "on_language_modify_submit_clicked(~a)" id)))
+ (:label "Modify LANGUAGE" :field-type "button" :onclick "on_language_modify_submit_clicked()"))
"name asc"))
(define-resume-component (skill
@@ -355,7 +355,7 @@ needs to JOIN with other data."
(:label "Add Skill" :field-type "button" :onclick "on_skill_add_submit_clicked()"))
`((:name "id" :field-type "hidden" :value ,(id skill) :required "required")
(:name "skill" :label "Skill" :field-type "text" :value ,(skill skill) :required "required")
- (:label "Modify SKILL" :field-type "button" :onclick ,(format nil "on_skill_modify_submit_clicked(~a)" id)))
+ (:label "Modify SKILL" :field-type "button" :onclick "on_skill_modify_submit_clicked()"))
"skill asc"))
(define-resume-component (job
@@ -372,5 +372,5 @@ needs to JOIN with other data."
(:name "start_date" :label "Start Date" :field-type "text" :value ,(start_date job) :required "required")
(:name "end_date" :label "End Date" :field-type "text" :value ,(end_date job) :required "required")
(:name "overview" :label "Overview" :field-type "textarea" :value ,(overview job) :required "required")
- (:label "Modify JOB" :field-type "button" :onclick ,(format nil "on_job_modify_submit_clicked(~a)" id)))
+ (:label "Modify JOB" :field-type "button" :onclick "on_job_modify_submit_clicked()"))
"end_date desc, start_date desc, company asc"))
diff --git a/lisp/webapps/resume/clojurescript/resume/src/resume/core.clj b/lisp/webapps/resume/clojurescript/resume/src/resume/core.clj
index 0e4333d..b07ea64 100644
--- a/lisp/webapps/resume/clojurescript/resume/src/resume/core.clj
+++ b/lisp/webapps/resume/clojurescript/resume/src/resume/core.clj
@@ -32,98 +32,97 @@
(defn ~(symbol (namespace ::x) (str "render-" component)) []
(ajax.core/GET ~(str "/resume/" component) {:handler handler-resume}))
- ))
- ;; (hiccups/defhtml ~(symbol (namespace ::x) (str "template-" component "-view")) [jsonobj]
- ;; [:div {:style "text-align: right"}
- ;; [:img {:src "/static/images/add.png"
- ;; :style "cursor:pointer; cursor:hand"
- ;; :onclick (str (namespace ::x) ".on_contactinfo_add_clicked()")}]]
- ;; (generic-table ~component jsonobj))
+ (hiccups/defhtml ~(symbol (namespace ::x) (str "template-" component "-view")) [jsonobj]
+ [:div {:style "text-align: right"}
+ [:img {:src "/static/images/add.png"
+ :style "cursor:pointer; cursor:hand"
+ :onclick (str (namespace ::x) ".on_contactinfo_add_clicked()")}]]
+ (generic-table ~component jsonobj))
- ;; (defn ~(symbol (namespace ::x) (str "handler-" component "-view")) [response]
- ;; (let [jsonobj (js->clj (js/JSON.parse response))]
- ;; (dommy/set-html! (dommy/sel1 :#content) (~(symbol (namespace ::x) (str "template-" component "-view")) jsonobj))))
+ (defn ~(symbol (namespace ::x) (str "handler-" component "-view")) [response]
+ (let [jsonobj (js->clj (js/JSON.parse response))]
+ (dommy/set-html! (dommy/sel1 :#content) (~(symbol (namespace ::x) (str "template-" component "-view")) jsonobj))))
- ;; (defn ~(symbol (namespace ::x) (str "render-" component "-view")) []
- ;; (ajax.core/GET ~(str "/resume/" component "/view")
- ;; {:handler ~(symbol (namespace ::x) (str "handler-" component "-view"))}))
+ (defn ~(symbol (namespace ::x) (str "render-" component "-view")) []
+ (ajax.core/GET ~(str "/resume/" component "/view")
+ {:handler ~(symbol (namespace ::x) (str "handler-" component "-view"))}))
- ;; (defn ~(symbol (namespace ::x) (str "on-" component "-add-clicked")) []
- ;; (~(symbol (namespace ::x) (str "render-" component "-add"))))
+ (defn ~(symbol (namespace ::x) (str "on-" component "-add-clicked")) []
+ (~(symbol (namespace ::x) (str "render-" component "-add"))))
- ;; (defn ~(symbol (namespace ::x) (str "handler-" component "-add")) [response]
- ;; (let [jsonobj (js->clj (js/JSON.parse response))]
- ;; (auth-notifications jsonobj)
- ;; (dommy/set-html! (dommy/sel1 :#modify-title) (get jsonobj "title"))
- ;; (dommy/set-html! (dommy/sel1 :#modify-body) (generic-component-add-modify jsonobj))
- ;; (.modal (jquery "#modify"))))
+ (defn ~(symbol (namespace ::x) (str "handler-" component "-add")) [response]
+ (let [jsonobj (js->clj (js/JSON.parse response))]
+ (auth-notifications jsonobj)
+ (dommy/set-html! (dommy/sel1 :#modify-title) (get jsonobj "title"))
+ (dommy/set-html! (dommy/sel1 :#modify-body) (generic-component-add-modify jsonobj))
+ (.modal (jquery "#modify"))))
- ;; (defn ~(symbol (namespace ::x) (str "render-" component "-add")) []
- ;; (ajax.core/POST ~(str "/resume/" component "/add")
- ;; {:handler ~(symbol (namespace ::x) (str "handler-" component "-add"))}))
+ (defn ~(symbol (namespace ::x) (str "render-" component "-add")) []
+ (ajax.core/POST ~(str "/resume/" component "/add")
+ {:handler ~(symbol (namespace ::x) (str "handler-" component "-add"))}))
- ;; (defn ~(symbol (namespace ::x) (str "on-" component "-add-submit-clicked")) []
- ;; (when (-> (jquery ~(str "#" component "-add-form"))
- ;; (.get "0")
- ;; (.checkValidity))
- ;; (.modal (jquery "#modify") "hide")
- ;; (~(symbol (namespace ::x) (str "render-" component "-add-submit")))))
+ (defn ~(symbol (namespace ::x) (str "on-" component "-add-submit-clicked")) []
+ (when (-> (jquery ~(str "#" component "-add-form"))
+ (.get "0")
+ (.checkValidity))
+ (.modal (jquery "#modify") "hide")
+ (~(symbol (namespace ::x) (str "render-" component "-add-submit")))))
- ;; (defn ~(symbol (namespace ::x) (str "handler-" component "-add-submit")) [response]
- ;; (let [jsonobj (js->clj (js/JSON.parse response))]
- ;; (auth-notifications jsonobj)
- ;; (on-menu-clicked ~(str "/resume/" component))))
+ (defn ~(symbol (namespace ::x) (str "handler-" component "-add-submit")) [response]
+ (let [jsonobj (js->clj (js/JSON.parse response))]
+ (auth-notifications jsonobj)
+ (on-menu-clicked ~(str "/resume/" component))))
- ;; (defn ~(symbol (namespace ::x) (str "render-" component "-add-submit")) []
- ;; (ajax.core/POST ~(str "/resume/" component "/add/submit")
- ;; {:format :raw
- ;; :params (form-fields-to-map ~(str "#" component "-add-form :input"))
- ;; :handler ~(symbol (namespace ::x) (str "handler-" component "-add-submit"))}))
+ (defn ~(symbol (namespace ::x) (str "render-" component "-add-submit")) []
+ (ajax.core/POST ~(str "/resume/" component "/add/submit")
+ {:format :raw
+ :params (form-fields-to-map ~(str "#" component "-add-form :input"))
+ :handler ~(symbol (namespace ::x) (str "handler-" component "-add-submit"))}))
- ;; (defn ~(symbol (namespace ::x) (str "on-" component "-modify-clicked")) [id]
- ;; (~(symbol (namespace ::x) (str "render-" component "-modify")) id))
+ (defn ~(symbol (namespace ::x) (str "on-" component "-modify-clicked")) [id]
+ (~(symbol (namespace ::x) (str "render-" component "-modify")) id))
- ;; (defn ~(symbol (namespace ::x) (str "handler-" component "-modify")) [response]
- ;; (let [jsonobj (js->clj (js/JSON.parse response))]
- ;; (auth-notifications jsonobj)
- ;; (dommy/set-html! (dommy/sel1 :#modify-title) (get jsonobj "title"))
- ;; (dommy/set-html! (dommy/sel1 :#modify-body) (generic-component-add-modify jsonobj))
- ;; (.modal (jquery "#modify"))))
+ (defn ~(symbol (namespace ::x) (str "handler-" component "-modify")) [response]
+ (let [jsonobj (js->clj (js/JSON.parse response))]
+ (auth-notifications jsonobj)
+ (dommy/set-html! (dommy/sel1 :#modify-title) (get jsonobj "title"))
+ (dommy/set-html! (dommy/sel1 :#modify-body) (generic-component-add-modify jsonobj))
+ (.modal (jquery "#modify"))))
- ;; (defn ~(symbol (namespace ::x) (str "render-" component "-modify")) [id]
- ;; (ajax.core/POST ~(str "/resume/" component "/modify")
- ;; {:format :raw
- ;; :params {:id id}
- ;; :handler ~(symbol (namespace ::x) (str "handler-" component "-modify"))}))
+ (defn ~(symbol (namespace ::x) (str "render-" component "-modify")) [id]
+ (ajax.core/POST ~(str "/resume/" component "/modify")
+ {:format :raw
+ :params {:id id}
+ :handler ~(symbol (namespace ::x) (str "handler-" component "-modify"))}))
- ;; (defn ~(symbol (namespace ::x) (str "on-" component "-modify-submit-clicked")) [id]
- ;; (when (-> (jquery ~(str "#" component "-modify-form"))
- ;; (.get "0")
- ;; (.checkValidity))
- ;; (.modal (jquery "#modify") "hide")
- ;; (~(symbol (namespace ::x) (str "render-" component "-modify-submit")) id)))
+ (defn ~(symbol (namespace ::x) (str "on-" component "-modify-submit-clicked")) []
+ (when (-> (jquery ~(str "#" component "-modify-form"))
+ (.get "0")
+ (.checkValidity))
+ (.modal (jquery "#modify") "hide")
+ (~(symbol (namespace ::x) (str "render-" component "-modify-submit")))))
- ;; (defn ~(symbol (namespace ::x) (str "handler-" component "-modify-submit")) [response]
- ;; (let [jsonobj (js->clj (js/JSON.parse response))]
- ;; (auth-notifications jsonobj)
- ;; (on-menu-clicked ~(str "/resume/" component))))
+ (defn ~(symbol (namespace ::x) (str "handler-" component "-modify-submit")) [response]
+ (let [jsonobj (js->clj (js/JSON.parse response))]
+ (auth-notifications jsonobj)
+ (on-menu-clicked ~(str "/resume/" component))))
- ;; (defn ~(symbol (namespace ::x) (str "render-" component "-modify-submit")) [id]
- ;; (ajax.core/POST ~(str "/resume/" component "/modify/submit")
- ;; {:format :raw
- ;; :params (form-fields-to-map ~(str "#" component "-modify-form :input"))
- ;; :handler ~(symbol (namespace ::x) (str "handler-" component "-modify-submit"))}))
+ (defn ~(symbol (namespace ::x) (str "render-" component "-modify-submit")) []
+ (ajax.core/POST ~(str "/resume/" component "/modify/submit")
+ {:format :raw
+ :params (form-fields-to-map ~(str "#" component "-modify-form :input"))
+ :handler ~(symbol (namespace ::x) (str "handler-" component "-modify-submit"))}))
- ;; (defn ~(symbol (namespace ::x) (str "on-" component" -delete-clicked")) [id]
- ;; (when (js/confirm (str "Are you sure you want to delete " id "? This action cannot be undone."))
- ;; (~(symbol (namespace ::x) (str "render-" component "-delete")) id)))
+ (defn ~(symbol (namespace ::x) (str "on-" component" -delete-clicked")) [id]
+ (when (js/confirm (str "Are you sure you want to delete " id "? This action cannot be undone."))
+ (~(symbol (namespace ::x) (str "render-" component "-delete")) id)))
- ;; (defn ~(symbol (namespace ::x) (str "handler-" component "-delete")) [response]
- ;; (let [jsonobj (js->clj (js/JSON.parse response))]
- ;; (auth-notifications jsonobj)
- ;; (on-menu-clicked ~(str "/resume/" component))))
+ (defn ~(symbol (namespace ::x) (str "handler-" component "-delete")) [response]
+ (let [jsonobj (js->clj (js/JSON.parse response))]
+ (auth-notifications jsonobj)
+ (on-menu-clicked ~(str "/resume/" component))))
- ;; (defn ~(symbol (namespace ::x) (str "render-" component "-delete")) [id]
- ;; (ajax.core/DELETE (str "/resume/" ~component "/delete/" id)
- ;; {:format :raw
- ;; :handler ~(symbol (namespace ::x) (str "handler-" component "-delete"))}))))
+ (defn ~(symbol (namespace ::x) (str "render-" component "-delete")) [id]
+ (ajax.core/DELETE (str "/resume/" ~component "/delete/" id)
+ {:format :raw
+ :handler ~(symbol (namespace ::x) (str "handler-" component "-delete"))}))))
diff --git a/lisp/webapps/resume/clojurescript/resume/src/resume/core.cljs b/lisp/webapps/resume/clojurescript/resume/src/resume/core.cljs
index 833039f..b2274fd 100644
--- a/lisp/webapps/resume/clojurescript/resume/src/resume/core.cljs
+++ b/lisp/webapps/resume/clojurescript/resume/src/resume/core.cljs
@@ -1327,7 +1327,7 @@
;; contactinfo
-(define-resume-component "contactinfo")
+;;(define-resume-component "contactinfo")
;; (hiccups/defhtml template-contactinfo [jsonobj]
;; [:h3 {:style "text-align: center"} (get jsonobj "title")]