Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
9225ef32
Commit
9225ef32
authored
Mar 30, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db連携
parent
c751d446
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
12 deletions
+112
-12
public_new/archive.html
+1
-1
public_new/js/archive.js
+45
-7
public_new/js/chat-db.js
+44
-0
public_new/js/chat-ui.js
+2
-4
public_new/template/template_archive_list.html
+20
-0
No files found.
public_new/archive.html
View file @
9225ef32
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
<script
id=
"archive-template"
type=
"text/template"
>
<script
id=
"archive-template"
type=
"text/template"
>
<
li
class
=
"d-flex align-items-center"
>
<
li
class
=
"d-flex align-items-center"
>
<
a
href
=
"archive_detail.html?archiveId=
1
"
class
=
"w-100"
>
<
a
href
=
"archive_detail.html?archiveId=
{{archiveId}}
"
class
=
"w-100"
>
<
div
class
=
"archive_item d-flex flex-row align-items-center w-100"
>
<
div
class
=
"archive_item d-flex flex-row align-items-center w-100"
>
<
div
class
=
"arhive_img"
>
<
div
class
=
"arhive_img"
>
<
div
class
=
"img_wrap bg_blue"
>
<
div
class
=
"img_wrap bg_blue"
>
...
...
public_new/js/archive.js
View file @
9225ef32
$
(
function
()
{
$
(
function
()
{
// アーカイブ検索
// アーカイブ検索
$
(
'#archive .search_form input[type="search"]'
).
keyup
(
function
(){
$
(
'#archive .search_form input[type="search"]'
).
keyup
(
function
(){
$
.
ajax
({
$
(
'.overlay_src_msg'
).
empty
();
url
:
'search_message_archive_list.html'
,
type
:
'POST'
,
var
keyword
=
$
(
'#archive .search_form input[type="search"]'
).
val
();
datatype
:
'html'
if
(
keyword
==
''
)
{
}).
done
(
function
(
data
)
{
return
;
$
(
'.overlay_src_msg'
).
html
(
data
);
}
})
// 検索
var
archiveList
=
CHAT_DB
.
getArchiveByName
(
keyword
);
var
archiveTemplate
;
$
.
get
({
url
:
"./template/template_archive_list.html"
,
async
:
false
}
,
function
(
text
)
{
archiveTemplate
=
text
;
});
archiveList
.
forEach
(
function
(
archive
)
{
var
typeImage
=
""
;
switch
(
archive
.
archiveType
)
{
case
0
:
// 画像
typeImage
=
"icon/icon_collabo_picture.png"
;
break
;
case
1
:
// 動画
typeImage
=
"icon/icon_collabo_videocam.png"
;
break
;
case
2
:
// 音声
typeImage
=
"icon/icon_collabo_headset.png"
;
break
;
case
3
:
// 文書
typeImage
=
"icon/icon_collabo_document.png"
;
break
;
default
:
// その他
typeImage
=
""
;
}
let
html
=
Mustache
.
render
(
archiveTemplate
,
{
archiveId
:
archive
.
archiveId
,
fileName
:
archive
.
archiveName
,
insertDate
:
archive
.
archiveDate
,
typeImage
:
typeImage
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
});
});
});
});
});
public_new/js/chat-db.js
View file @
9225ef32
...
@@ -104,3 +104,47 @@ CHAT_DB.getGroupByName = function(groupName) {
...
@@ -104,3 +104,47 @@ CHAT_DB.getGroupByName = function(groupName) {
return
JSON
.
parse
(
android
.
getGroupByName
(
groupName
));
return
JSON
.
parse
(
android
.
getGroupByName
(
groupName
));
}
}
};
};
// アーカイブ一覧
CHAT_DB
.
getArchiveList
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
// String形式をJsonに変更してReturn
webkit
.
messageHandlers
.
getArchiveList
.
postMessage
();
return
JSON
.
parse
(
iosArchiveList
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
// TODO
}
};
CHAT_DB
.
updateArchiveList
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
updateArchiveList
.
postMessage
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
// TODO
}
};
CHAT_DB
.
getArchiveByName
=
function
(
archiveName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
// TODO IOS処理
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
// TODO
}
};
// アーカイブ詳細
CHAT_DB
.
getArchiveDetail
=
function
(
archiveId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
// TODO IOS処理
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
// TODO
}
};
CHAT_DB
.
updateArchiveDetail
=
function
(
archiveId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
updateArchiveDetail
.
postMessage
({
archiveId
});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
// TODO
}
};
public_new/js/chat-ui.js
View file @
9225ef32
...
@@ -1417,14 +1417,13 @@ CHAT_UI.refreshArchiveScreen = function() {
...
@@ -1417,14 +1417,13 @@ CHAT_UI.refreshArchiveScreen = function() {
// }
// }
// let html = Mustache.render(archiveTemplate, {
// let html = Mustache.render(archiveTemplate, {
// archiveId: archive.archiveId,
// fileName: archive.archiveName,
// fileName: archive.archiveName,
// insertDate: archive.archiveDate,
// insertDate: archive.archiveDate,
// typeImage: typeImage
// typeImage: typeImage
// });
// });
// let obj = $(jQuery.parseHTML(html)).on('click', function() {
// let obj = $(jQuery.parseHTML(html)).on('click', function() {
// // データの受け渡し
// CHAT_UI.refreshArchiveDetailScreen(archive.archiveId);
// });
// });
// $('#archiveList').append(obj);
// $('#archiveList').append(obj);
...
@@ -1455,14 +1454,13 @@ CHAT_UI.refreshArchiveScreen = function() {
...
@@ -1455,14 +1454,13 @@ CHAT_UI.refreshArchiveScreen = function() {
}
}
let
html
=
Mustache
.
render
(
archiveTemplate
,
{
let
html
=
Mustache
.
render
(
archiveTemplate
,
{
archiveId
:
1
,
fileName
:
"ファイル名"
,
fileName
:
"ファイル名"
,
insertDate
:
"2021/03/03 16:14"
,
insertDate
:
"2021/03/03 16:14"
,
typeImage
:
typeImage
typeImage
:
typeImage
});
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
// データの受け渡し
CHAT_UI
.
refreshArchiveDetailScreen
(
1
);
});
});
$
(
'#archiveList'
).
append
(
obj
);
$
(
'#archiveList'
).
append
(
obj
);
...
...
public_new/template/template_archive_list.html
0 → 100644
View file @
9225ef32
<li
class=
"d-flex align-items-center"
>
<a
href=
"archive_detail.html?archiveId={{archiveId}}"
class=
"w-100"
>
<div
class=
"archive_item d-flex flex-row align-items-center w-100"
>
<div
class=
"arhive_img"
>
<div
class=
"img_wrap bg_blue"
>
<img
src=
"{{typeImage}}"
alt=
"動画"
/>
</div>
</div>
<div
class=
"archive_desc"
>
<div
class=
"archive_name"
>
<span>
{{fileName}}
</span>
</div>
<div
class=
"archive_date"
>
<span>
{{insertDate}}
</span>
</div>
</div>
</div>
</a>
</li>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment