From 9f46c9cd670deae433b4862e1f219ed7168a3f64 Mon Sep 17 00:00:00 2001 From: msyu Date: Tue, 22 Apr 2025 14:29:25 +0300 Subject: [PATCH] 096 bookmarks --- v1/Application.cfc | 2 +- v1/resources/bookmark.cfc | 72 +++++++++++++ v1/resources/bookmark_ls.cfc | 201 +++++++++++++++++++++++++++++++++++ 3 files changed, 274 insertions(+), 1 deletion(-) create mode 100644 v1/resources/bookmark.cfc create mode 100644 v1/resources/bookmark_ls.cfc diff --git a/v1/Application.cfc b/v1/Application.cfc index 93cff0f..7210f5a 100644 --- a/v1/Application.cfc +++ b/v1/Application.cfc @@ -51,7 +51,7 @@ //variables.framework.docs={}; variables.framework.docs.APIName="Deck API"; - variables.framework.docs.APIVersion="0.095"; + variables.framework.docs.APIVersion="0.096"; variables.framework.globalHeaders = structNew(); variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location"; diff --git a/v1/resources/bookmark.cfc b/v1/resources/bookmark.cfc new file mode 100644 index 0000000..8eeb8cb --- /dev/null +++ b/v1/resources/bookmark.cfc @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + update bookmark set + dt_updated= + ,updater_id= + + ,bookmark= + + + ,descr= + + + ,url= + + + ,icon_url= + + + ,sort= + + + ,is_enabled= + + where + contragent_id= + AND bookmark_uid=; + --select @@rowcount as cnt; + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/v1/resources/bookmark_ls.cfc b/v1/resources/bookmark_ls.cfc new file mode 100644 index 0000000..8f5f8d4 --- /dev/null +++ b/v1/resources/bookmark_ls.cfc @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + + b.bookmark_uid::text as bookmark_uid + b.bookmark + b.descr + b.url + b.icon_url + b.contragent_id + b.is_enabled + + to_char(b.dt_created, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_created + to_char(b.dt_updated, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_updated + + from bookmark b + /*left outer join contragent k on (b.contragent_id=k.contragent_id)*/ + where 1=1 + AND (b.contragent_id = ) + order by sort desc + + limit #maxrows# + + + + + + select count(*) as cnt + from bookmark b + /*left outer join contragent k on (b.contragent_id=k.contragent_id)*/ + where 1=1 + AND (b.contragent_id = ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into bookmark ( + bookmark_uid,contragent_id, bookmark,url,icon_url,descr,sort,is_enabled,dt_created,creator_id + ) values ( + + , + , + , + , + , + , + , + , + , + ); + + + + + + + + + + + + function plain2htm(s) { + return replace(replace(s, chr(13),'',"ALL"),chr(10),'
', "ALL"); + } + //request.plain2htm = plain2htm; + + function htm2plain(s) { + return replaceNoCase(s, '
', '#chr(13)##chr(10)#', "ALL"); + } + //request.htm2plain = htm2plain; + + function cleanHtm(s) { + return replaceList(s, '<,>,"', '<,>,"'); + } + //request.cleanHtm = cleanHtm; +
+ + + + + + + + + + + +
\ No newline at end of file