1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
This is a Example program to retrieve and display the data.
Press the Run button on the right of the screen (described the behavior of the Example program below).
Please create a new application rewrite this program work.
*/
//infoウィンドウの初期化
var currentwindow=null;
window.onload = function() {
//LinkDataからのデータ取得
var fileValue = 'suzakacity_contact_app ';
tmp_a_data = new Array();
tmp_b_data = new Array();
tmp_c_data = new Array();
$.each(LinkData.getWorks(), function(workKey, workValue) {
$.each(LinkData.getFiles(workValue), function(fileKey, fileValue) {
$.each(LinkData.getSubjects(workValue,fileValue),function(subjKey,subjValue) {
var tmp_data = {}
var tmp_b = {}
var tmp_c = {}
tmp_data["id"] = subjValue;
$.each(LinkData.getProperties(workValue, fileValue), function(propKey, propValue) {
$.each(LinkData.getObjects(workValue, fileValue, subjValue, propValue), function(objKey, objValue) {
if(propValue == "http://linkdata.org/property/rdf1s4732i#Department_name"){
tmp_data["name"] = objValue;
tmp_b["text"] = objValue;
} else if(propValue == "http://linkdata.org/property/rdf1s4732i#telephone_number"){
tmp_data["tel"] = objValue;
tmp_c["text"] = objValue;
} else if(propValue == "http://linkdata.org/property/rdf1s4732i#email_address"){
tmp_data["mail"] = objValue;
tmp_c["sub"] = objValue;
} else if(propValue == "http://linkdata.org/property/rdf1s4732i#furigana"){
tmp_data["kana"] = objValue;
tmp_b["sub"] = objValue;
}
});
tmp_a_data.push(tmp_data);
tmp_b_data.push(tmp_b);
tmp_c_data.push(tmp_c);
//全データ
all_data = tmp_a_data;
all_b_data = tmp_b_data;
all_c_data = tmp_c_data;
//課のデータを表示
$(".selectka").append("<option value='-1' selected='selected'>部署を選択してください。</option>");
for (var i in all_data){
if (all_data[i].name ){
var all_id=all_data[i].name;
$(".selectka").append("<option value='"+ all_data[i].id +"'>" + all_data[i].name+ "</option>");
var canvas = document.getElementById('type');
var patapatas = [
new Patapata(document.getElementById('type_kana'), tmp_b_data, 0.15),
new Patapata(document.getElementById('type_renraku'), tmp_c_data, 0.15),
];
//課が選択、変更された時の処理
$(".selectka").change(function() {
//詳細データのリセット
$("#result").empty();
//選択された課の詳細データの表示
var sectionKaKey = $("option:selected", $(this)).val();
if (sectionKaKey == -1) {
//$("#result").html("");
return;
$("#result").append("<div style='padding-left:10px;'>【連絡先】</div>");
var detail_c = sectionKaKey;
if (all_data[i].id === detail_c){
$("#result").append("<div style='padding-left:10px;'>"+all_data[i].kana+ "<br/>"+"TEL:" + "<a href=tel:" + all_data[i].tel + ">" + all_data[i].tel + "</a>"+ "</div>");
$("#result").append("<div style='padding-left:10px;'>Mail:" + "<a href=mailto:" + all_data[i].mail + ">" + all_data[i].mail + "</a></div>");
//alert(i);
patapatas[0].set(Number(i));
patapatas[1].set(Number(i));
$(".selectka").mousedown(function() {
// var btn = document.getElementById('patapatactl');
// btn.onclick = function() {
for (var i = 0; i < patapatas.length; i++) {
// alert(i);
patapatas[i].set(-1);
patapatas[i].drawPtpt();
// }
/* --- ボックス --- */
div.row {
width: 280px; /* ボックスの幅 */
background-color: #F7FE2E; /* ボックスの背景色 */
border: 1px #c0c0c0 solid; /* ボックスの境界線 */
padding: 5px 10px; /* ボックスのパディング(上下、左右) */
font-size: 90%; /* ボックスの文字サイズ */
/* --- 見出し --- */
div.row h3 {
margin: 0; /* 見出しのマージン */
padding: 5px 10px; /* 見出しのパディング(上下、左右) */
background-color: #F7FE2E; /* 見出しの背景色 */
border-bottom: 1px #c0c0c0 solid; /* 見出しの下境界線 */
font-size: 100%; /* 見出しの文字サイズ */
/* --- ボックス内の段落 --- */
div.result {
margin: 1em 10px; /* 段落のマージン(上下、左右) */
<div class="row">
<h2>砺波市役所パタパタ連絡先</h2>
<h3><div class="left"><select class="selectka"></select></div></h3>
<br/>
<!--
<button id="patapatactl">回転</button>
-->
<div style="line-height: 10px; vertical-align: top;">
<canvas id="type_kana" width="280" height="70" style="font-family: 'VLゴシック', 'メイリオ' sans-serif"></canvas><br><br>
<canvas id="type_renraku" width="280" height="70" style="font-family: 'Verdana' monospace"></canvas><br>
</div>
<br>
<div id="result"></div>
<br><br><br>
Click the Browse button or drag and drop to choose files to upload
The Maximum upload size is 1MB.(bmp,gif,jpeg,jpg,png)
*Required field
Add name for another language
You can upload jpg, gif, png file formats
Add description for another language
Fork original application has been updated. >>see
Original application has been updated. >>see
Playing...
Please enter a valid URL