Project

General

Profile

« Previous | Next » 

Revision 50035

made a new look

View differences:

modules/dli-service-portal/trunk/DLI.py
32 32

  
33 33
base_dnet_url = "http://aggregator-dli.openaire.eu/dli/"
34 34

  
35
pid_resolver = {
36
    "pdb": "http://www.rcsb.org/pdb/explore/explore.do?structureId=%s",
37
    "ncbi-n": "http://www.ncbi.nlm.nih.gov/gquery/?term=%s",
38
    "pmid": "http://www.ncbi.nlm.nih.gov/pubmed/%s",
39
    "pmcid": "http://www.ncbi.nlm.nih.gov/pmc/articles/%s",
40
    "pubmedid": "http://www.ncbi.nlm.nih.gov/pubmed/%s",
41
    "doi": "http://dx.doi.org/%s",
42
    "genbank": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
43
    "nuccore": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
44
    "swiss-prot": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
45
    "arrayexpress": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
46
    "biomodels": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
47
    "bmrb": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
48
    "ena": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
49
    "geo": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
50
    "ensembl": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
51
    "mgi": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
52
    "bind": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
53
    "pride": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
54
    "ddbj": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
55
    "bioproject": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
56
    "embl": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
57
    "sra": "http://www.ncbi.nlm.nih.gov/nucest/%s?report=genbank",
58
}
35 59

  
60

  
36 61
class InvalidUsage(Exception):
37 62
    status_code = 400
38 63

  
......
95 120
    return ""
96 121

  
97 122

  
123
@app.route('/api/resolveId', methods=['get'])
124
def resolveIdentifier():
125
    pid = request.form.get('pid')
126
    pid_type = request.form.get('pid_type')
127
    if pid_type!= None:
128
        if pid_type.lower() in  pid_resolver:
129
            return pid_resolver[pid_type.lower()] % pid
130
        else:
131
            return "http://identifiers.org/%s:%s" % (pid_type, pid)
132
    return ""
133

  
134

  
135

  
98 136
@app.route('/api/post/', methods=['post', 'get'])
99 137
def query_post():
100 138
    action = None
......
108 146
    if 'query' in request.form:
109 147
        query = request.form['query']
110 148
    if 'start' in request.form:
111
        start = int(request.form['start'])
149
        start = 0
150
        try:
151
            start = int(request.form.get('start',0))
152
        except:
153
            pass
112 154
    if 'filter' in request.form:
113 155
        filter_key = request.form['filter']
114 156

  
......
128 170
    app.logger.addHandler(dlilogger)
129 171
    monitor(app, port=8000)
130 172
    app.run()
173
    # app.run(host="0.0.0.0")
modules/dli-service-portal/trunk/api.properties
1
api.index = dli
1
api.index = dli_shadow
2 2
es_index = ip-90-147-167-25.ct1.garrservices.it,ip-90-147-167-26.ct1.garrservices.it,ip-90-147-167-27.ct1.garrservices.it, ip-90-147-167-28.ct1.garrservices.it
modules/dli-service-portal/trunk/static/partials/detail.html
1 1
<style>
2 2
    .loader {
3
    border: 16px solid #f3f3f3; /* Light grey */
4
    border-top: 16px solid #3498db; /* Blue */
5
    border-radius: 50%;
6
    width: 120px;
7
    height: 120px;
8
    animation: spin 2s linear infinite;
9
    margin: auto;
10
}
3
        border: 16px solid #f3f3f3; /* Light grey */
4
        border-top: 16px solid #3498db; /* Blue */
5
        border-radius: 50%;
6
        width: 120px;
7
        height: 120px;
8
        animation: spin 2s linear infinite;
9
        margin: auto;
10
    }
11 11

  
12
@keyframes spin {
13
    0% { transform: rotate(0deg); }
14
    100% { transform: rotate(360deg); }
15
}
12
    @keyframes spin {
13
        0% {
14
            transform: rotate(0deg);
15
        }
16
        100% {
17
            transform: rotate(360deg);
18
        }
19
    }
16 20
</style>
17 21

  
18 22

  
19

  
20 23
<section ng-hide="item">
21 24
    <div class="row">
22 25
        <div class="col-lg-12 center-align">
23
                <div class="loader"></div>
26
            <div class="loader"></div>
24 27
        </div>
25 28
    </div>
26 29

  
......
31 34

  
32 35
    <div>
33 36
        <div class="row">
34
            <div class="col-lg-11 col-lg-offset-1" style="font-size: large">
35
                <i ng-show="item.typology=='dataset'" style="padding: 10px"
36
                   class="fa fa-database fa-2x  responsive-img"></i>
37
                <i ng-show="item.typology=='publication'" style="padding: 10px"
38
                   class="fa fa-book fa-2x circle responsive-img"></i>
39
                <i ng-hide="item.typology=='publication' || item.typology=='dataset'"
40
                   class="fa fa-question-circle fa-2x blue-text circle responsive-img"></i>
41
                <b><a href="{{ item.resolved_url }}" style="margin: 10px">
42
                    <d>    {{ item.title[0] }} </d>
43
                    <d ng-hide="item.title">metadata not available - Pid not resolved</d>
44 37

  
45
                </a></b></div>
46
        </div>
47
    </div>
38
            <div class="col-lg-7 col-lg-offset-1">
39
                <div class="row" style="margin-bottom: 5px">
40
                    <div class="col-lg-12">
41
                        <span class="label label-info" style="font-size: 100%">{{ item.typology }}</span>
42
                        <span ng-repeat="date in showDate(item.date)" class="label label-warning"
43
                              style="font-size: 100%"> {{ date }}</span>
44
                    </div>
45
                </div>
46
                <div class="row">
47
                    <div class="col-lg-12">
48
                        <p><b style="color: black">{{ item.title[0] }}</b></p>
49
                    </div>
50
                    <div class="col-lg-12">
51
                        <auth style="font-size: small;  color: darkred"
52
                              ng-repeat="author in item.author">
53
                            <f ng-hide="$index==0">,</f>
54
                            <i>{{ author }}</i>
55
                        </auth>
56
                    </div>
57
                    <div class="col-lg-12">
58
                        <span ng-repeat="d in item.date">{{ d }}</span>
59
                    </div>
60
                    <div class="col-lg-12">
61
                        <p style="color: grey; border-left: 4px solid #eeeeee; padding-left: 10px; font-size:15px; text-align: justify">
62
                            {{item.abstract}}
63
                        </p>
64
                    </div>
65
                </div>
66
            </div>
48 67

  
49 68

  
50
    <div class="row">
51
        <div class="col-lg-8 col-lg-offset-1">
52
            <table style="width: 100%">
53
                <tr>
54
                    <td style="width: 20%"><b>Typology:</b></td>
55
                    <td> {{ item.typology }}</td>
56
                </tr>
57
                <tr ng-repeat="id in item.localIdentifier">
58
                    <td><b>Identifier:</b></td>
59
                    <td> {{ id.id }}  <b>Identifier type:</b> {{ id.type }}</td>
60
                </tr>
61
                <tr>
62
                    <td class="valign-wrapper"><b>Author(s):</b></td>
63
                    <td class="green-text">
64
                        <f style="color: darkgreen" ng-repeat="a in item.author">{{ a }},</f>
65
                    </td>
66
                </tr>
67
                <tr ng-show="item.abstract">
68
                    <td><b>Description:</b></td>
69
                    <td style="text-align: justify"><i>{{ item.abstract }}</i></td>
69
            <div class="col-lg-3">
70
                 <div class="row">
71
                <div class="panel panel-primary">
72
                    <div class="panel-body">
73
                        <div ng-repeat="id in item.localIdentifier">{{id.type }}:   <a href="{{ id.url }}">{{ id.id}}</a> </div>
74
                        <hr>
75
                        Sources
76
                        <ul>
77
                            <li ng-repeat="d in item.datasources"><a> {{ d.datasourceName }}</a></li>
78
                        </ul>
79
                        <div ng-show="item.publisher.length">
80
                            <hr>
81
                            Publisher:
82
                            <ul>
83
                                <li ng-repeat="d in item.publisher"><a> {{ d }}</a></li>
84
                            </ul>
85
                        </div>
86
                        <hr>
87
                        <div id="share"></div>
70 88

  
71
                </tr>
72
                <tr ng-show="item.date[0]">
73
                    <td><b>Date:</b></td>
74
                    <td class="valign-wrapper green-text"> {{ item.date[0] }}</td>
75
                </tr>
76
                <tr>
77
                    <td><b>Publisher:</b></td>
78
                    <td class="valign-wrapper green-text" style="color: darkgreen"> {{ item.publisher[0] }}</td>
79
                </tr>
89
                    </div>
90
                </div>
91
            </div>
92
            </div>
80 93

  
81
                <tr>
82
                    <td><b>Subject:</b></td>
83
                    <td class="valign-wrapper green-text">
84
                        <table>
85
                            <tr ng-repeat="sub in item.subject"><td><f style="color: darkgoldenrod">{{ sub.value }}</f> </td></tr>
86
                        </table>
87
                    </td>
88
                </tr>
89
            </table>
90
            <br>
91
            <table style="width: 100%">
92
                <tr>
93
                    <td style="width: 20%"><b>provenance (of this object):</b></td>
94
                    <td class="valign-wrapper">
95
                        <table style="width: 100%">
96
                            <thead>
97
                            <tr>
98
                                <th class="center-align" style="width: 20%">Date Of Collection</th>
99
                                <th class="center-align" style="width: 20%">Datasource</th>
100
                                <th class="center-align" style="width: 60%">Action</th>
101
                            </tr>
102
                            </thead>
103
                            <tbody>
104
                            <tr ng-repeat="d in item.datasources">
105
                                <td class="centered">{{ d.collectionDate }}</td>
106
                                <td class="centered">{{ d.datasourceName }}</td>
107
                                <td class="centered">
108
                                    <div ng-show="d.completionStatus==='complete'  && d.provisionMode==='collected'">
109
                                        Full-metadata record collected from {{ d.datasourceName }}
110
                                    </div>
111
                                    <div ng-show="d.completionStatus==='incomplete'">Object PID collected from
112
                                        {{ d.datasourceName }}
113
                                    </div>
114
                                    <div ng-show="d.completionStatus==='complete' && d.provisionMode==='resolved'">
115
                                        Full-metadata record collected from {{ d.datasourceName }}
116
                                    </div>
117
                                </td>
118
                            </tr>
119
                            </tbody>
120
                        </table>
121
                    </td>
122
                </tr>
123
            </table>
124
            <br>
94

  
125 95
        </div>
126 96
    </div>
127 97

  
98

  
99

  
128 100
    <div class="row">
129 101
        <div class="col-lg-11 col-lg-offset-1">
130 102
            <ul id="myTabs" class="nav nav-tabs text-center" role="tablist">
......
143 115

  
144 116
                    <div ng-repeat="rels in relations.related_dataset">
145 117
                        <div class="row">
146
                            <div class="col-lg-12"><a href="#/detail/{{ rels.target.dnetIdentifier }}" class="blue-text"> <i
147
                                    style="padding: 10px"
148
                                    class="fa fa-database fa-2x blue-text circle responsive-img"></i><b>{{ rels.target.title }}</b>
118
                            <div class="col-lg-12" style="padding: 10px;">
119
                                <span class="label label-info" style="font-size: 100%">{{ rels.target.objectType }}</span>
120
                        <span ng-repeat="date in showDate(rels.target.date)" class="label label-warning"
121
                              style="font-size: 100%"> {{ date }}</span>
122
                            </div>
123
                            <div class="col-lg-12">
124
                                <a href="#/detail/{{ rels.target.dnetIdentifier }}"class="blue-text"><b>{{ rels.target.title }}</b>
149 125
                            </a></div>
150 126

  
151 127
                            <div class="col-lg-12">
152
                                <f style="color: green" ng-repeat="a in rels.target.creator">{{ a.name }},</f>
128
                                <i style="color: darkred" ng-repeat="a in rels.target.creator">{{ a.name }},</i>
153 129
                            </div>
154 130
                            <div ng-repeat="ids in rels.target.identifier">
155
                                <div class="col-lg-12"><b>PID</b> : {{ ids.identifier }}</div>
156
                                <div class="col-lg-12"><b>PID Type</b> : {{ ids.schema }}</div>
131
                                <div class="col-lg-12"><b>{{ ids.schema }}</b> : <a href="{{ ids.url }}"> {{ ids.identifier }}</a></div>
157 132
                            </div>
158 133
                        </div>
159 134
                        <div class="row">
160 135
                            <div class="col-lg-2">
161
                                <b>provenance (of this link): </b>
136
                                <b>Sources:</b> <span ng-repeat="d in rels.linkprovider">{{ d.name }}</span>
162 137
                            </div>
163
                            <div class="col-lg-8">
164
                                <table style="width: 100%">
165
                                    <thead>
166
                                    <tr>
167
                                        <th class="center-align" style="width: 20%">Date Of Collection</th>
168
                                        <th class="center-align" style="width: 20%">Datasource</th>
169
                                        <th class="center-align" style="width: 60%">Action</th>
170
                                    </tr>
171
                                    </thead>
172
                                    <tbody>
173
                                    <tr ng-repeat="d in rels.linkprovider">
174
                                        <td class="left-align">{{ d.collectionDate }}</td>
175
                                        <td class="left-align">{{ d.name }}</td>
176
                                        <td class="left-align">
177
                                            Relation collected from {{ d.name }}
178
                                        </td>
179
                                    </tr>
180
                                    </tbody>
181
                                </table>
182
                            </div>
138

  
183 139
                        </div>
184 140
                    </div>
185 141

  
186 142
                    <div class="row centered">
187
                            <div class="text-center">
188
                                <ul class="pagination centered">
189
                                    <li><a ng-click="prevPage('dataset')">&lt;</a></li>
190
                                    <li ><a ng-click="nextPage('dataset')">&gt;</a></li>
191
                                </ul>
192
                            </div>
143
                        <div class="text-center">
144
                            <ul class="pagination centered">
145
                                <li><a ng-click="prevPage('dataset')">&lt;</a></li>
146
                                <li><a ng-click="nextPage('dataset')">&gt;</a></li>
147
                            </ul>
148
                        </div>
193 149
                    </div>
194 150
                </div>
195 151
                <div role="tabpanel" class="tab-pane fade" id="publication" aria-labelledby="profile-tab">
196 152
                    <div ng-repeat="rels in relations.related_publications">
197 153
                        <div class="row">
198
                            <div class="col-lg-12">
199
                                <a href="#/detail/{{ rels.target.dnetIdentifier }}" class="blue-text">
200
                                    <i style="padding: 10px" class="fa fa-book fa-2x blue-text circle responsive-img"></i>
201
                                    <b>{{ rels.target.title }}</b>
202
                                </a>
154
                            <div class="col-lg-12" style="padding: 10px;">
155
                                <span class="label label-info" style="font-size: 100%">{{ rels.target.objectType }}</span>
156
                        <span ng-repeat="date in showDate(rels.target.date)" class="label label-warning"
157
                              style="font-size: 100%"> {{ date }}</span>
203 158
                            </div>
204 159
                            <div class="col-lg-12">
205
                                <f style="color: green" ng-repeat="a in rels.target.creator">{{ a.name }},</f>
160
                                <a href="#/detail/{{ rels.target.dnetIdentifier }}"class="blue-text"><b>{{ rels.target.title }}</b>
161
                            </a></div>
162

  
163
                            <div class="col-lg-12">
164
                                <i style="color: darkred" ng-repeat="a in rels.target.creator">{{ a.name }},</i>
206 165
                            </div>
207 166
                            <div ng-repeat="ids in rels.target.identifier">
208
                                <div class="col-lg-12"><b>PID</b> : {{ ids.identifier }}</div>
209
                                <div class="col-lg-12"><b>PID Type</b> : {{ ids.schema }}</div>
167
                                <div class="col-lg-12"><b>{{ ids.schema }}</b> : <a href="{{ ids.url }}"> {{ ids.identifier }}</a></div>
210 168
                            </div>
211 169
                        </div>
212 170
                        <div class="row">
213 171
                            <div class="col-lg-2">
214
                                <b>provenance (of this link): </b>
172
                                <b>Sources:</b> <span ng-repeat="d in rels.linkprovider">{{ d.name }}</span>
215 173
                            </div>
216
                            <div class="col-lg-8">
217
                                <table style="width: 100%">
218
                                    <thead>
219
                                    <tr>
220
                                        <th class="center-align" style="width: 20%">Date Of Collection</th>
221
                                        <th class="center-align" style="width: 20%">Datasource</th>
222
                                        <th class="center-align" style="width: 60%">Action</th>
223
                                    </tr>
224
                                    </thead>
225
                                    <tbody>
226
                                    <tr ng-repeat="d in rels.linkprovider">
227
                                        <td class="left-align">{{ d.collectionDate }}</td>
228
                                        <td class="left-align">{{ d.name }}</td>
229
                                        <td class="left-align">
230
                                            Relation collected from {{ d.name }}
231
                                        </td>
232
                                    </tr>
233
                                    </tbody>
234
                                </table>
235
                            </div>
174

  
236 175
                        </div>
237 176
                    </div>
238 177
                    <div class="row centered">
239
                            <div class="text-center">
240
                                <ul class="pagination centered">
241
                                    <li><a ng-click="prevPage('publication')">&lt;</a></li>
242
                                    <li ><a ng-click="nextPage('publication')">&gt;</a></li>
243
                                </ul>
244
                            </div>
178
                        <div class="text-center">
179
                            <ul class="pagination centered">
180
                                <li><a ng-click="prevPage('publication')">&lt;</a></li>
181
                                <li><a ng-click="nextPage('publication')">&gt;</a></li>
182
                            </ul>
183
                        </div>
245 184
                    </div>
246 185
                </div>
247 186
                <div role="tabpanel" class="tab-pane fade" id="other" aria-labelledby="dropdown1-tab">
248 187
                    <div ng-repeat="rels in relations.related_unknown">
249 188
                        <div class="row">
250
                            <div class="col-lg-12"><a href="#/detail/{{ rels.target.dnetIdentifier }}" class="blue-text"> <i
189
                            <div class="col-lg-12"><a href="#/detail/{{ rels.target.dnetIdentifier }}"
190
                                                      class="blue-text"> <i
251 191
                                    style="padding: 10px"
252 192
                                    class="fa fa-question-circle fa-2x blue-text circle responsive-img"></i><b>{{ rels.target.identifier[0].identifier }}</b>
253 193
                            </a></div>
......
286 226
                            </div>
287 227
                        </div>
288 228
                    </div>
289
                            <div class="row centered">
290
                            <div class="text-center">
291
                                <ul class="pagination centered">
292
                                    <li><a ng-click="prevPage('unknown')">&lt;</a></li>
293
                                    <li ><a ng-click="nextPage('unknown')">&gt;</a></li>
294
                                </ul>
295
                            </div>
229
                    <div class="row centered">
230
                        <div class="text-center">
231
                            <ul class="pagination centered">
232
                                <li><a ng-click="prevPage('unknown')">&lt;</a></li>
233
                                <li><a ng-click="nextPage('unknown')">&gt;</a></li>
234
                            </ul>
235
                        </div>
296 236
                    </div>
297 237

  
298 238
                </div>
......
301 241
    </div>
302 242
</section>
303 243
<script>
304

  
244
        $("#share").jsSocials({
245
            showLabel: false,
246
		    showCount: false,
247
            shares: ["email", "twitter", "facebook", "googleplus", "linkedin"]
248
        });
305 249
</script>
modules/dli-service-portal/trunk/static/partials/query.html
1 1
<style>
2 2
    .loader {
3
    border: 16px solid #f3f3f3; /* Light grey */
4
    border-top: 16px solid #3498db; /* Blue */
5
    border-radius: 50%;
6
    width: 120px;
7
    height: 120px;
8
    animation: spin 2s linear infinite;
9
    margin: auto;
10
}
3
        border: 16px solid #f3f3f3; /* Light grey */
4
        border-top: 16px solid #3498db; /* Blue */
5
        border-radius: 50%;
6
        width: 120px;
7
        height: 120px;
8
        animation: spin 2s linear infinite;
9
        margin: auto;
10
    }
11 11

  
12
@keyframes spin {
13
    0% { transform: rotate(0deg); }
14
    100% { transform: rotate(360deg); }
15
}
12
    @keyframes spin {
13
        0% {
14
            transform: rotate(0deg);
15
        }
16
        100% {
17
            transform: rotate(360deg);
18
        }
19
    }
16 20
</style>
17 21

  
18 22

  
......
24 28
            <form ng-submit="makeQuery()">
25 29
                <b>Query:</b>
26 30
                <input style="width: 80%" ng-model="query" ng-enter="doSomething()"> <a
27
                    href="#/query/q={{query}}"><span class="glyphicon glyphicon-search"></span> Search</a>
31
                    href="#/query/q={{ query }}"><span class="glyphicon glyphicon-search"></span> Search</a>
28 32
            </form>
29 33
        </div>
30 34
        <div class="col-lg-2 right-align">
......
42 46
        </div>
43 47

  
44 48

  
45
<!--
46
        <div class="col l12 offset-l4 center-align">
47
            <h5 class="red-text">No match found</h5>
48
        </div> -->
49
        <!--
50
                <div class="col l12 offset-l4 center-align">
51
                    <h5 class="red-text">No match found</h5>
52
                </div> -->
49 53
    </div>
50 54

  
51
      <div class="row centered" ng-show="result_query.length">
52
                <div class="text-center">
53
                <ul class="pagination centered">
54
                    <li ng-show="page ==1" class="disabled"><a href="">&lt;</a></li>
55
                    <li ng-hide="page ==1"><a href="#/query/{{ filterPath() }}page={{page - 1}}q={{ query }}">&lt;</a></li>
56
                     <li ng-class="activePage(n)" ng-repeat="n in pageRange">
57
                         <a href="#/query/{{ filterPath() }}page={{n}}/q={{ query }}">{{ n }}</a>
58
                     </li>
59
                    <li ng-hide="page == lastPage" ><a href="#/query/{{ filterPath() }}page={{page + 1}}/q={{ query }}">&gt;</a></li>
60
                    <li ng-show="page ==lastPage" class="disabled"><a href="">&gt;</a></li>
55
    <div class="row centered" ng-show="result_query.length">
56
        <div class="text-center">
57
            <ul class="pagination centered">
58
                <li ng-show="page ==1" class="disabled"><a href="">&lt;</a></li>
59
                <li ng-hide="page ==1"><a href="#/query/{{ filterPath() }}page={{ page - 1 }}/q={{ query }}">&lt;</a>
60
                </li>
61
                <li ng-class="activePage(n)" ng-repeat="n in pageRange">
62
                    <a href="#/query/{{ filterPath() }}page={{ n }}/q={{ query }}">{{ n }}</a>
63
                </li>
64
                <li ng-hide="page == lastPage"><a href="#/query/{{ filterPath() }}page={{ page + 1 }}/q={{ query }}">&gt;</a>
65
                </li>
66
                <li ng-show="page ==lastPage" class="disabled"><a href="">&gt;</a></li>
61 67

  
62 68

  
69
            </ul>
70
        </div>
71
    </div>
63 72

  
64
                </ul>
65
                    </div>
66
      </div>
67

  
68 73
    <div class="row container-fluid" ng-show="result_query.length">
69 74
        <div class="col-md-3" id="leftCol">
70 75
            <div class="row">
71 76
                <div class="panel panel-primary">
72
                  <div class="panel-heading"><b>Typology</b></div>
73
                  <div class="panel-body">
74
                      <ul class="list-group">
75
                          <li class="list-group-item" ng-repeat="value in facet.typology ">
76
                              <span class="badge">{{ value.count }}</span>
77
                              <a  href='#/query/{{ calculateFilter("typology", value.key)}}/q={{ query }}'>{{ value.key }}</a>
78
                          </li>
79
                      </ul>
80
                  </div>
77
                    <div class="panel-heading"><b>Typology</b></div>
78
                    <div class="panel-body">
79
                        <ul class="list-group">
80
                            <li class="list-group-item" ng-repeat="value in facet.typology ">
81
                                <span class="badge">{{ value.count }}</span>
82
                                <a class="browseLink" href='#/query/{{ calculateFilter("typology", value.key) }}/q={{ query }}'>{{ value.key }}</a>
83
                            </li>
84
                        </ul>
85
                    </div>
81 86
                </div>
82 87
            </div>
83 88

  
84 89
            <div class="row">
85 90
                <div class="panel panel-primary">
86
                  <div class="panel-heading"><b>Link Provider</b></div>
87
                  <div class="panel-body">
88
                      <ul class="list-group">
89
                          <li class="list-group-item" ng-repeat="value in facet.datasource ">
90
                              <span class="badge">{{ value.count }}</span>
91
                              <a  href='#/query/{{calculateFilter("datasource", value.key) }}/q={{ query }}'>{{ value.key }}</a>
92
                          </li>
93
                      </ul>
94
                  </div>
91
                    <div class="panel-heading"><b>Link Provider</b></div>
92
                    <div class="panel-body">
93
                        <ul class="list-group">
94
                            <li class="list-group-item" ng-repeat="value in facet.datasource ">
95
                                <span class="badge">{{ value.count }}</span>
96
                                <a  class="browseLink" href='#/query/{{ calculateFilter("datasource", value.key) }}/q={{ query }}'>{{ value.key }}</a>
97
                            </li>
98
                        </ul>
99
                    </div>
95 100
                </div>
96 101
            </div>
97 102

  
98 103
            <div class="row">
99 104
                <div class="panel panel-primary">
100
                  <div class="panel-heading"><b>Link Publisher</b></div>
101
                  <div class="panel-body">
102
                      <ul class="list-group">
103
                          <li class="list-group-item" ng-repeat="value in facet.publishers ">
104
                              <span class="badge">{{ value.count }}</span>
105
                              <a  href='#/query/{{calculateFilter("publisher", value.key) }}/q={{ query }}'>{{ value.key }}</a>
106
                          </li>
107
                      </ul>
108
                  </div>
105
                    <div class="panel-heading"><b>Link Publisher</b></div>
106
                    <div class="panel-body">
107
                        <ul class="list-group">
108
                            <li class="list-group-item" ng-repeat="value in facet.publishers ">
109
                                <span class="badge">{{ value.count }}</span>
110
                                <a class="browseLink" href='#/query/{{ calculateFilter("publisher", value.key) }}/q={{ query }}'>{{ value.key }}</a>
111
                            </li>
112
                        </ul>
113
                    </div>
109 114
                </div>
110 115
            </div>
111 116

  
112 117
            <div class="row">
113 118
                <div class="panel panel-primary">
114
                  <div class="panel-heading"><b>Pid Type</b></div>
115
                  <div class="panel-body">
116
                      <ul class="list-group">
117
                          <li class="list-group-item" ng-repeat="value in facet.pid ">
118
                              <span class="badge">{{ value.count }}</span>
119
                              <a  href='#/query/{{ calculateFilter("pidtype", value.key) }}/q={{ query }}'>{{ value.key }}</a>
120
                          </li>
121
                      </ul>
122
                  </div>
119
                    <div class="panel-heading"><b>Pid Type</b></div>
120
                    <div class="panel-body">
121
                        <ul class="list-group">
122
                            <li class="list-group-item" ng-repeat="value in facet.pid ">
123
                                <span class="badge">{{ value.count }}</span>
124
                                <a class="browseLink" href='#/query/{{ calculateFilter("pidtype", value.key) }}/q={{ query }}'>{{ value.key }}</a>
125
                            </li>
126
                        </ul>
127
                    </div>
123 128
                </div>
124 129
            </div>
125 130

  
126 131
        </div>
127 132
        <div class="col-md-9 col-xs-12">
133

  
128 134
            <div class="row" ng-repeat="result in result_query">
129
                 <div class="col-lg-12">
135
                <div class="col-lg-12" style="margin-top: 10px">
136
                    <span class="label label-info" style="font-size: 100%">{{ result.typology }}</span>
137
                    <span ng-repeat="date in showDate(result.date)" class="label label-warning"
138
                          style="font-size: 100%"> {{ date }}</span>
139
                </div>
140

  
141
                <div class="col-lg-12" style="margin-top: 10px">
130 142
                    <a href="#/detail/{{ result.id }}">
131
                        <i ng-hide="result.typology!= 'unknown' "
132
                           style="padding: 10px"
133
                           class="fa fa-question-circle fa-2x blue-text circle responsive-img"></i>
134
                        <i ng-show="result.typology=='dataset'" style="padding: 10px"
135
                           class="fa fa-database fa-2x blue-text circle responsive-img"></i>
136
                        <i style="padding: 10px" ng-show="result.typology=='publication'"
137
                           class="fa fa-book fa-2x blue-text circle responsive-img"></i>
138
                        <b ng-show="result.title">{{result.title[0]}}</b>
139
                        <b ng-hide="result.title">Metadata non resolved for pid : {{result.localIdentifier[0].id}}</b>
143
                        <b ng-show="result.title">{{ result.title[0] }}</b>
144
                        <b ng-hide="result.title">Metadata non resolved for pid : {{ result.localIdentifier[0].id }}</b>
140 145
                    </a>
141
                 </div>
146
                </div>
142 147

  
143 148
                <div class="col-lg-12">
149
                    <div>
150

  
151
                        <auth style="font-size: small;  color: darkred"
152
                              ng-repeat="author in result.author">
153
                            <f ng-hide="$index==0">,</f>
154
                            <i>{{ author }}</i>
155
                        </auth>
156
                    </div>
157
                    <span class="more" style="color: #9ba4ad">
158
                        {{ result.abstract }}
159

  
160
                    </span>
161

  
162

  
163
                </div>
164

  
165

  
166
                <div class="col-lg-12">
144 167
                    <d style="font-size: small"></d>
145
                    <auth style="font-size: small; color: #1565C0"
146
                          ng-repeat="author in result.author">
147
                        <f ng-hide="$index==0">,</f>
148
                        {{author}}
149
                    </auth>
150
                    <dd ng-repeat="date in result.date"> <d ng-show="date.length"> {{date}}</d></dd>
151
                    <dd ng-repeat="publisher in result.publisher"><d style="font-size: small; color:darkgreen" ng-show="publisher.length">Publisher: {{ publisher }}</d> </dd>
168

  
169

  
170
                    Sources:
171
                    <span ng-repeat="datatasource in result.datasources">
172
                        <a ng-show="datatasource.datasourceName.length"> {{ datatasource.datasourceName }}</a>
173
                    </span>
174
                    <dd ng-repeat="publisher in result.publisher">
175
                        <d style="font-size: small; color:darkgreen" ng-show="publisher.length">
176
                            Publisher: {{ publisher }}</d>
177
                    </dd>
152 178
                </div>
153
                <p>
154
                <div class="col-lg-2">
155
                    <auth style="font-size: small" class="orange-text"> <b>{{ result.relatedDatasets}}</b> Related Datasets
156
                    </auth>
179

  
180

  
181
                <div class="col-lg-12 text-right">
182

  
183

  
184
                            <auth style="font-size: small; margin-left: 10px" class="orange-text">
185
                                Link to Datasets: <b>{{ result.relatedDatasets }}</b>
186
                            </auth>
187

  
188
                            <auth style="font-size: small; margin-left: 10px" class="orange-text">Link to Literature: <b> {{ result.relatedPublications }}</b>
189

  
190
                            </auth>
191

  
192
                            <auth style="font-size: small; margin-left: 10px" class="orange-text">
193
                                Link to other Objects:
194
                                <b>{{ result.relatedUnknown }}</b>
195
                            </auth>
196

  
197

  
198

  
199
                     <hr>
157 200
                </div>
158
                <div class="col-lg-2">
159
                    <auth style="font-size: small" class="orange-text"><b> {{result.relatedPublications }}</b> Related Publications
160
                    </auth>
161
                </div>
162
                <div class="col-lg-2">
163
                    <auth style="font-size: small" class="orange-text"> <b>{{result.relatedUnknown}}</b> Other Relations
164
                    </auth>
165
                </div>
166
                <div class="col-lg-2">
167
                    <auth style="font-size: small" class="orange-text"><a
168
                            href="{{ result.resolved_url }}" class="orange-text"> <i
169
                            class="fa fa-link"></i> Original Object </a></auth>
170
                </div>
171
                <div class="col-lg-3">
172
                    [
173
                    <auth style="font-size: small" class="orange-text"
174
                          ng-repeat="prov in result.datasources">
175
                        <f ng-hide="$index==0">,</f>
176
                        <a href='#/datasource/name/{{ prov.datasourceId }}' style="color: orange">{{prov.datasourceName}}</a>
177
                    </auth>
178
                    <d style="font-size: small">]</d>
179
                </div>
180 201

  
202

  
203

  
181 204
            </div>
205

  
182 206
        </div>
207

  
208

  
183 209
    </div>
184 210

  
185 211

  
modules/dli-service-portal/trunk/static/partials/index.html
10 10
            <div class="container centered">
11 11
                <div class="row">
12 12
                    <div class="col-lg-12 centered">
13
                        <img ng-hide="facet"  img class="img-responsive img-centered"  style="max-width:700px" src="img/logo_big.png" alt="">
13
                        <img ng-hide="facet"  img class="img-responsive img-centered"  style="max-width:400px" src="img/logo_big.png" alt="">
14 14
                        <div class="row">
15 15
                            <div class="form-group col-lg-10 floating-label-form-group controls">
16 16
                                <form ng-submit="makeQuery()">
......
128 128
                <div class="col-lg-12 col-xs-12">
129 129

  
130 130

  
131
                    <p style="color: #2293F1">Search and browse in <b style="color: orange">620.000</b> publications,
132
                        <b style="color: orange">2.600.000</b> datasets,
133
                        <b style="color: orange">18.000.0000</b> bi-directional scholix links,</p>
134
                    <p style="color: #2293F1">
135
                        from <b style="color: orange">1000</b> publishers,
136
                        <b style="color: orange">10</b> data centers,
137
                        <b style="color: orange">DataCite, CrossRef</b>, and <b style="color: orange">OpenAIRE</b>.</p>
131
                    <p >Search and browse in <span style="color: darkred">620.000</span> literature objects,
132
                        <span style="color: darkred">2.600.000</span> datasets,
133
                        <span style="color: darkred">18.000.0000</span> bi-directional scholix links,</p>
134
                    <p style=>
135
                        from <span style="color: darkred">1000</span> publishers,
136
                        <span style="color: darkred">10</span> data centers,
137
                        <span style="color: darkred"> CrossRef, DataCite</span>, and <span style="color: darkred">OpenAIRE</span>.</p>
138 138
                </div>
139 139
                <div class="col-lg-6 col-xs-12">
140 140
                    <h4><b> </b></h4>
modules/dli-service-portal/trunk/static/partials/api.html
1
<section>
1
<section style="font-size: 20px; font-family: Lato">
2

  
2 3
    <div class="row">
3
        <div class="col-lg-12">
4
            <h4 class="text-center"><b>Scholix REST API</b></h4>
4
        <div class="col-lg-8 col-lg-offset-2">
5

  
6
            <div class="card z-depth-2" style="padding-top: 10px ;">
7
                <div class="row" style="margin-top: 10px">
8
                    <h4 class="center-align"><b>About Scholix</b></h4>
9
                    The goal of the Scholix initiative is to establish a high level interoperability framework
10
                    for exchanging information about the links
11
                    between scholarly literature and data. It aims to enable an open information ecosystem to
12
                    understand systematically what data underpins literature and what literature references
13
                    data.
14

  
15
                    Scholix maintains an evolving set of <a href="www.scholix.org">Guidelines</a> consisting of:
16
                    (i) an information model (conceptual definition of what is a Scholix scholarly link), (ii) a
17
                    link metadata schema (set of metadata fields representing a Scholix link), and (iii)
18
                    a corresponding XML and JSON schema.
19

  
20

  
21
                    <img src="img/ScholixDM.png" style="max-width: 80%; margin-left: auto; margin-right: auto">
22

  
23

  
24
                </div>
25
            </div>
5 26
        </div>
6 27
    </div>
7
    <div class="row">
8
            <div class="col-lg8 col-lg-offset-2">
9
                <div class="row">
10 28

  
11 29

  
12
                    <div class="col-lg12">
30
    <div class="row">
31
        <div class="col-lg-8 col-lg-offset-2">
13 32

  
14
                        <p>
15
                            A new Scholix API has been implemented for searching about links
16
                        </p>
33
            <div class="card z-depth-2" style="padding-top: 10px">
34
                <div class="row" style="margin-top: 10px">
35
                    <h4 class="center-align"><b>Scholix REST API</b></h4>
36
                    The Scholix Swagger API allows clients to run REST queries over the Scholexplorer index in order to fetch links matching given criteria. In the current version, clients can search for:
37
                    <ul>
38
                        <li> links whose source object has a given PID or PID type </li>
39
                        <li> links whose source object has been published by a given data source</li>
40
                        <li> links that were collected from a given data source </li>
41
                    </ul>
42
                    The APIs are available from <a
43
                        href="https://api.scholexplorer.openaire.eu/v1/ui"> here</a>. The results of queries return lists of
44
                        links encoded as JSON Scholix records. JSON (and XML) schema and example records  for Scholix links are availabe on
45
                        <a href="https://github.com/scholix/schema">GitHib</a>.
17 46

  
18
                        <p>
19
                            For details on this API  please refer to the official documentation <a
20
                                href="https://api.scholexplorer.openaire.eu/v1/ui"> here</a>
21
                        </p>
22
                        <p>
23
                            The “<b><i>Scholix</i></b>” format is described <a href="http://www.scholix.org">here</a>
24
                        </p>
25
                    </div>
26 47
                </div>
27 48
            </div>
28 49
        </div>
50
    </div>
51

  
52

  
29 53
</section>
54

  
55

  
modules/dli-service-portal/trunk/static/partials/about.html
1
<section>
1
<section style="font-size: 20px; font-family: Lato">
2 2
    <div class="row">
3
    <div class="col-lg-8 col-lg-offset-2">
3
        <div class="col-lg-8 col-lg-offset-2">
4 4

  
5
        <div class="card z-depth-2" style="padding-top: 10px">
6
            <div class="row">
7
                <div class="col l8 offset-l2">
8
                    <div class="row">
9
                        <h4 class="center-align"><b>About</b></h4>
5
            <div class="card z-depth-2" style="padding-top: 10px">
6
                <div class="row">
7
                    <div class="col l8 offset-l2">
8
                        <div class="row">
9
                            <h4 class="center-align"><b>About</b></h4>
10
                            <div class="col-lg-12">
11
                                Scholexplorer populates and provides access to a graph of links between dataset
12
                                and literature objects and dataset
13
                                and dataset objects. Links (and objects) are provided by data sources managed by
14
                                publishers (e.g. Elsevier, Thomson Reuters), data centers (e.g. PANGAEA, CCDC), or other
15
                                organizations providing services to store and manage links between data sets and
16
                                publications (e.g. CrossRef, DataCite, OpenAIRE). Scholexplorer aggregates link metadata
17
                                harvested from
18
                                the
19
                                data sources and out of these builds and harmonised and de-duplicated graph of scholarly
20
                                objects. The graph is openly accessible (CC-0) via <a
21
                                    href="api.scholexplorer.openaire.eu/v1/ui">search REST APIs </a>
22
                                that return links in <a href="www.scholix.org"> Scholix format</a>.
10 23

  
11
                        <div class="col l12" style="margin-bottom: 20px">
12 24

  
25
                            </div>
13 26

  
14
                            Although research data publishing is today widely regarded as crucial for reproducibility
15
                            and proper
16
                            assessment of scientific results, several challenges still need to be solved to fully
17
                            realize its potential.
18
                            Developing links between the published literature and datasets is one of them. Current
19
                            solutions are mostly based on bilateral,
20
                            ad-hoc agreements between publishers and data centers, operating in silos whose content
21
                            cannot be readily combined to deliver
22
                            a network connecting research data and literature. The RDA Data Publishing Services Working
23
                            Group (DPS-WG) [<b>1</b>]
24
                            aims to address this issue by bringing together different stakeholders to agree on common
25
                            standards, combine links from disparate sources,
26
                            and create a universal, open service for collecting and sharing such links: the
27
                            Data-Literature Interlinking Service.
28
                            <br>
29 27
                        </div>
30
                        <div class="col l12 center-align"><img src="images/data_model.png" style="height: 300px"
31
                                                               class="center-align"></div>
32
                        <div class="col l12" style="margin-bottom: 40px">
33
                            <p>The realization and operation of this Service is the result of a synergic effort of the
34
                                DPS-WG and the OpenAIRE infrastructure. The Service populates and provides access to a
35
                                graph of dataset-literature links collected from a variety of major data centers,
36
                                publishers, and research organizations. It offers facilities for the following classes
37
                                of actors</p>
38
                            <ul type="square">
39
                                <li style="text-indent: 10px;"><b>- End-users</b>: searching and browsing the graph of
40
                                    links via the <a href="/index.html">DLI Service portal</a></li>
41
                                <li style="text-indent: 10px;"><b>- Third-party service developers</b>: accessing
42
                                    publications and datasets in the graph via programmatic APIs (link to API page)
43
                                </li>
44
                                <li style="text-indent: 10px;"><b>- Content providers</b>:willing to feed high-quality
45
                                    authoritative links between publications and datasets or between datasets to the
46
                                    Service (link to API page).
47
                                    <b>Note</b>: formal data acquisition policies, SLAs, and data provider registration
48
                                    procedures will be produced at a later stage; currently each “application” is
49
                                    processed independently with bilateral agreements.
50
                                </li>
51
                            </ul>
52
                            Based on feedback from content providers and consumers, DPS-WG will continue to refine the
53
                            Service data model and exchange format to make it a universal, cross-platform,
54
                            cross-discipline solution for collecting and sharing dataset-literature links.
55
                        </div>
56 28
                    </div>
57
                    <div class="row" style="margin-bottom: 0px">
58
                        <div class="col l12">
59
                            <b class="title_about">References</b>
60
                        </div>
61
                    </div>
62
                    <div class="row">
63
                        <div class="col l12">
64
                            <ul>
65
                                <li>[1] RDA Data Publishing Services Working Group <a
66
                                        href="https://rd-alliance.org/groups/rdawds-publishing-data-services-wg.html">Case
67
                                    Statement</a></li>
68
                                <li>[2] 3TU.Datacentrum</li>
69
                                <li>[3] Australian National Data Service (ANDS)</li>
70
                                <li>[4] Cambridge Crystallographic Data Centre (CCDC)</li>
71
                                <li>[5] CrossRef</li>
72
                                <li>[6] DataCite</li>
73
                                <li>[7] Elsevier</li>
74
                                <li>[8] EMBL European Bioinformatics Institute (EMBL-EBI)</li>
75
                                <li>[9] Interuniversity Consortium for Political and Social Research (ICPSR)</li>
76
                                <li>[10] Institute of Electrical and Electronics Engineers (IEEE)</li>
77
                                <li>[11] International Association of STM Publishers</li>
78
                                <li>[12] National Data Service (NDS)</li>
79
                                <li>[13] OpenAIRE</li>
80
                                <li>[14] ORCID</li>
81
                                <li>[15] Protein Data Bank (PDB)</li>
82
                                <li>[16] PANGAEA</li>
83
                                <li>[17] RMap</li>
84
                                <li>[18] Royal Society of Chemistry (RSc)</li>
85
                                <li>[19] Springer</li>
29
                </div>
30
            </div>
31
        </div>
32
    </div>
86 33

  
87
                            </ul>
34

  
35
    <div class="row">
36
        <div class="col-lg-8 col-lg-offset-2">
37

  
38
            <div class="card z-depth-2" style="padding-top: 10px">
39
                <div class="row">
40
                    <div class="col l8 offset-l2">
41
                        <div class="row">
42
                            <h4 class="center-align"><b>References (@ OpenAIRE)</b></h4>
43
                            <div class="col-lg-12">
44
                                <ul>
45
                                    <li>
46
                                        <a href="https://www.openaire.eu/search/publication?articleId=dedup_wf_001::309cd9083a888d86db07849b9011ad51">On
47
                                            Bridging Data Centers and Publishers: The Data-Literature Interlinking
48
                                            Service</a> Burton, Adrian; Koers, Hylke; Manghi, Paolo; La Bruzzo, Sandro; Aryani, Amir; Diepenbroek, Michael; SCHINDLER Uwe	(2015)</li>
49
                                    <li><a href="https://www.openaire.eu/search/publication?articleId=od______2659::a84cec8e6970d6608256103f1146da3f">
50
                                        Persistent Identifiers: a Prerequisite to Establish the Framework for Scholarly Link Exchange—Scholix</a>
51
                                         Mustapha Mokrane; Adrian Burton; Hylke Koers; Markus Stocker (2016)</li>
52
                                    <li>
53
                                        <a href="https://www.openaire.eu/search/publication?articleId=od______2367::72a2ecc3e2d7d17b3c49f47f7d0b3294">The
54
                                            data-literature interlinking service: towards a common infrastructure for
55
                                            sharing data-article links</a> Burton, Adrian; Koers, Hylke; Manghi, Paolo; La Bruzzo, Sandro; Aryani, Amir; Diepenbroek, Michael; SCHINDLER Uwe	(2017)
56
                                    </li>
57
                                    <li> <a href="http://mirror.dlib.org/dlib/january17/burton/01burton.html">The Scholix Framework for Interoperability in Data-Literature Information Exchange</a>
58
                                    Adrian Burton, Hylke Koers, Paolo Manghi, Martin Fenner, Sandro La Bruzzo, Amir Aryani, Michael Diepenbroek, Uwe Schindler, Markus Stocker (2017)
59
                                    </li>
60

  
61
                                </ul>
62

  
63

  
64
                            </div>
65

  
88 66
                        </div>
89 67
                    </div>
90 68
                </div>
91

  
92 69
            </div>
93 70
        </div>
94 71
    </div>
95
</div>
96 72
</section>
modules/dli-service-portal/trunk/static/partials/statistics.html
46 46

  
47 47
                                    <div class="row center">
48 48
                                        <div class="col-lg-4 col-lg-offset-2 col-sm-12">
49
                                            <h4><b>Publications</b></h4>
49
                                            <h4><b>Literature</b></h4>
50 50
                                        </div>
51 51
                                        <div class="col-lg-4 col-lg-offset-2 col-sm-12">
52 52
                                            <h4><b>Datasets</b></h4>
modules/dli-service-portal/trunk/static/bower_components/jquery/LICENSE.txt
1
Copyright JS Foundation and other contributors, https://js.foundation/
2

  
3
This software consists of voluntary contributions made by many
4
individuals. For exact contribution history, see the revision history
5
available at https://github.com/jquery/jquery
6

  
7
The following license applies to all parts of this software except as
8
documented below:
9

  
10
====
11

  
12
Permission is hereby granted, free of charge, to any person obtaining
13
a copy of this software and associated documentation files (the
14
"Software"), to deal in the Software without restriction, including
15
without limitation the rights to use, copy, modify, merge, publish,
16
distribute, sublicense, and/or sell copies of the Software, and to
17
permit persons to whom the Software is furnished to do so, subject to
18
the following conditions:
19

  
20
The above copyright notice and this permission notice shall be
21
included in all copies or substantial portions of the Software.
22

  
23
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30

  
31
====
32

  
33
All files located in the node_modules and external directories are
34
externally maintained libraries used by this software which have their
35
own licenses; we recommend you read them, as their terms may differ from
36
the terms above.
modules/dli-service-portal/trunk/static/bower_components/jquery/external/sizzle/LICENSE.txt
1
Copyright jQuery Foundation and other contributors, https://jquery.org/
2

  
3
This software consists of voluntary contributions made by many
4
individuals. For exact contribution history, see the revision history
5
available at https://github.com/jquery/sizzle
6

  
7
The following license applies to all parts of this software except as
8
documented below:
9

  
10
====
11

  
12
Permission is hereby granted, free of charge, to any person obtaining
13
a copy of this software and associated documentation files (the
14
"Software"), to deal in the Software without restriction, including
15
without limitation the rights to use, copy, modify, merge, publish,
16
distribute, sublicense, and/or sell copies of the Software, and to
17
permit persons to whom the Software is furnished to do so, subject to
18
the following conditions:
19

  
20
The above copyright notice and this permission notice shall be
21
included in all copies or substantial portions of the Software.
22

  
23
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30

  
31
====
32

  
33
All files located in the node_modules and external directories are
34
externally maintained libraries used by this software which have their
35
own licenses; we recommend you read them, as their terms may differ from
36
the terms above.
modules/dli-service-portal/trunk/static/bower_components/jquery/external/sizzle/dist/sizzle.js
1
/*!
2
 * Sizzle CSS Selector Engine v2.3.3
3
 * https://sizzlejs.com/
4
 *
5
 * Copyright jQuery Foundation and other contributors
6
 * Released under the MIT license
7
 * http://jquery.org/license
8
 *
9
 * Date: 2016-08-08
10
 */
11
(function( window ) {
12

  
13
var i,
14
	support,
15
	Expr,
16
	getText,
17
	isXML,
18
	tokenize,
19
	compile,
20
	select,
21
	outermostContext,
22
	sortInput,
23
	hasDuplicate,
24

  
25
	// Local document vars
26
	setDocument,
27
	document,
28
	docElem,
29
	documentIsHTML,
30
	rbuggyQSA,
31
	rbuggyMatches,
32
	matches,
33
	contains,
34

  
35
	// Instance-specific data
36
	expando = "sizzle" + 1 * new Date(),
37
	preferredDoc = window.document,
38
	dirruns = 0,
39
	done = 0,
40
	classCache = createCache(),
41
	tokenCache = createCache(),
42
	compilerCache = createCache(),
43
	sortOrder = function( a, b ) {
44
		if ( a === b ) {
45
			hasDuplicate = true;
46
		}
47
		return 0;
48
	},
49

  
50
	// Instance methods
51
	hasOwn = ({}).hasOwnProperty,
52
	arr = [],
53
	pop = arr.pop,
54
	push_native = arr.push,
55
	push = arr.push,
56
	slice = arr.slice,
57
	// Use a stripped-down indexOf as it's faster than native
58
	// https://jsperf.com/thor-indexof-vs-for/5
59
	indexOf = function( list, elem ) {
60
		var i = 0,
61
			len = list.length;
62
		for ( ; i < len; i++ ) {
63
			if ( list[i] === elem ) {
64
				return i;
65
			}
66
		}
67
		return -1;
68
	},
69

  
70
	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
71

  
72
	// Regular expressions
73

  
74
	// http://www.w3.org/TR/css3-selectors/#whitespace
75
	whitespace = "[\\x20\\t\\r\\n\\f]",
76

  
77
	// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
78
	identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
79

  
80
	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
81
	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
82
		// Operator (capture 2)
83
		"*([*^$|!~]?=)" + whitespace +
84
		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
85
		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
86
		"*\\]",
87

  
88
	pseudos = ":(" + identifier + ")(?:\\((" +
89
		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
90
		// 1. quoted (capture 3; capture 4 or capture 5)
91
		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
92
		// 2. simple (capture 6)
93
		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
94
		// 3. anything else (capture 2)
95
		".*" +
96
		")\\)|)",
97

  
98
	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
99
	rwhitespace = new RegExp( whitespace + "+", "g" ),
100
	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
101

  
102
	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
103
	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
104

  
105
	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
106

  
107
	rpseudo = new RegExp( pseudos ),
108
	ridentifier = new RegExp( "^" + identifier + "$" ),
109

  
110
	matchExpr = {
111
		"ID": new RegExp( "^#(" + identifier + ")" ),
112
		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
113
		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
114
		"ATTR": new RegExp( "^" + attributes ),
115
		"PSEUDO": new RegExp( "^" + pseudos ),
116
		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
117
			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
118
			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
119
		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
120
		// For use in libraries implementing .is()
121
		// We use this for POS matching in `select`
122
		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
123
			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
124
	},
125

  
126
	rinputs = /^(?:input|select|textarea|button)$/i,
127
	rheader = /^h\d$/i,
128

  
129
	rnative = /^[^{]+\{\s*\[native \w/,
130

  
131
	// Easily-parseable/retrievable ID or TAG or CLASS selectors
132
	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
133

  
134
	rsibling = /[+~]/,
135

  
136
	// CSS escapes
137
	// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
138
	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
139
	funescape = function( _, escaped, escapedWhitespace ) {
140
		var high = "0x" + escaped - 0x10000;
141
		// NaN means non-codepoint
142
		// Support: Firefox<24
143
		// Workaround erroneous numeric interpretation of +"0x"
144
		return high !== high || escapedWhitespace ?
145
			escaped :
146
			high < 0 ?
147
				// BMP codepoint
148
				String.fromCharCode( high + 0x10000 ) :
149
				// Supplemental Plane codepoint (surrogate pair)
150
				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
151
	},
152

  
153
	// CSS string/identifier serialization
154
	// https://drafts.csswg.org/cssom/#common-serializing-idioms
155
	rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
156
	fcssescape = function( ch, asCodePoint ) {
157
		if ( asCodePoint ) {
158

  
159
			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
160
			if ( ch === "\0" ) {
161
				return "\uFFFD";
162
			}
163

  
164
			// Control characters and (dependent upon position) numbers get escaped as code points
165
			return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
166
		}
167

  
168
		// Other potentially-special ASCII characters get backslash-escaped
169
		return "\\" + ch;
170
	},
171

  
172
	// Used for iframes
173
	// See setDocument()
174
	// Removing the function wrapper causes a "Permission Denied"
175
	// error in IE
176
	unloadHandler = function() {
177
		setDocument();
178
	},
179

  
180
	disabledAncestor = addCombinator(
181
		function( elem ) {
182
			return elem.disabled === true && ("form" in elem || "label" in elem);
183
		},
184
		{ dir: "parentNode", next: "legend" }
185
	);
186

  
187
// Optimize for push.apply( _, NodeList )
188
try {
189
	push.apply(
190
		(arr = slice.call( preferredDoc.childNodes )),
191
		preferredDoc.childNodes
192
	);
193
	// Support: Android<4.0
194
	// Detect silently failing push.apply
195
	arr[ preferredDoc.childNodes.length ].nodeType;
196
} catch ( e ) {
197
	push = { apply: arr.length ?
198

  
199
		// Leverage slice if possible
200
		function( target, els ) {
201
			push_native.apply( target, slice.call(els) );
202
		} :
203

  
204
		// Support: IE<9
205
		// Otherwise append directly
206
		function( target, els ) {
207
			var j = target.length,
208
				i = 0;
209
			// Can't trust NodeList.length
210
			while ( (target[j++] = els[i++]) ) {}
211
			target.length = j - 1;
212
		}
213
	};
214
}
215

  
216
function Sizzle( selector, context, results, seed ) {
217
	var m, i, elem, nid, match, groups, newSelector,
218
		newContext = context && context.ownerDocument,
219

  
220
		// nodeType defaults to 9, since context defaults to document
221
		nodeType = context ? context.nodeType : 9;
222

  
223
	results = results || [];
224

  
225
	// Return early from calls with invalid selector or context
226
	if ( typeof selector !== "string" || !selector ||
227
		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
228

  
229
		return results;
230
	}
231

  
232
	// Try to shortcut find operations (as opposed to filters) in HTML documents
233
	if ( !seed ) {
234

  
235
		if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
236
			setDocument( context );
237
		}
238
		context = context || document;
239

  
240
		if ( documentIsHTML ) {
241

  
242
			// If the selector is sufficiently simple, try using a "get*By*" DOM method
243
			// (excepting DocumentFragment context, where the methods don't exist)
244
			if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
245

  
246
				// ID selector
247
				if ( (m = match[1]) ) {
248

  
249
					// Document context
250
					if ( nodeType === 9 ) {
251
						if ( (elem = context.getElementById( m )) ) {
252

  
253
							// Support: IE, Opera, Webkit
254
							// TODO: identify versions
255
							// getElementById can match elements by name instead of ID
256
							if ( elem.id === m ) {
257
								results.push( elem );
258
								return results;
259
							}
260
						} else {
261
							return results;
262
						}
263

  
264
					// Element context
265
					} else {
266

  
267
						// Support: IE, Opera, Webkit
268
						// TODO: identify versions
269
						// getElementById can match elements by name instead of ID
270
						if ( newContext && (elem = newContext.getElementById( m )) &&
271
							contains( context, elem ) &&
272
							elem.id === m ) {
273

  
274
							results.push( elem );
275
							return results;
276
						}
277
					}
278

  
279
				// Type selector
280
				} else if ( match[2] ) {
281
					push.apply( results, context.getElementsByTagName( selector ) );
282
					return results;
283

  
284
				// Class selector
285
				} else if ( (m = match[3]) && support.getElementsByClassName &&
286
					context.getElementsByClassName ) {
287

  
288
					push.apply( results, context.getElementsByClassName( m ) );
289
					return results;
290
				}
291
			}
292

  
293
			// Take advantage of querySelectorAll
294
			if ( support.qsa &&
295
				!compilerCache[ selector + " " ] &&
296
				(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
297

  
298
				if ( nodeType !== 1 ) {
299
					newContext = context;
300
					newSelector = selector;
301

  
302
				// qSA looks outside Element context, which is not what we want
303
				// Thanks to Andrew Dupont for this workaround technique
304
				// Support: IE <=8
305
				// Exclude object elements
306
				} else if ( context.nodeName.toLowerCase() !== "object" ) {
307

  
308
					// Capture the context ID, setting it first if necessary
309
					if ( (nid = context.getAttribute( "id" )) ) {
310
						nid = nid.replace( rcssescape, fcssescape );
311
					} else {
312
						context.setAttribute( "id", (nid = expando) );
313
					}
314

  
315
					// Prefix every selector in the list
316
					groups = tokenize( selector );
317
					i = groups.length;
318
					while ( i-- ) {
319
						groups[i] = "#" + nid + " " + toSelector( groups[i] );
320
					}
321
					newSelector = groups.join( "," );
322

  
323
					// Expand context for sibling selectors
324
					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
325
						context;
326
				}
327

  
328
				if ( newSelector ) {
329
					try {
330
						push.apply( results,
331
							newContext.querySelectorAll( newSelector )
332
						);
333
						return results;
334
					} catch ( qsaError ) {
335
					} finally {
336
						if ( nid === expando ) {
337
							context.removeAttribute( "id" );
338
						}
339
					}
340
				}
341
			}
342
		}
343
	}
344

  
345
	// All others
346
	return select( selector.replace( rtrim, "$1" ), context, results, seed );
347
}
348

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff