Mercurial > hg > LGMap
comparison geotemco/js/Dataloader/DataloaderGui.js @ 0:57bde4830927
first commit
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 24 Mar 2015 11:37:17 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:57bde4830927 |
---|---|
1 /* | |
2 * DataloaderGui.js | |
3 * | |
4 * Copyright (c) 2013, Sebastian Kruse. All rights reserved. | |
5 * | |
6 * This library is free software; you can redistribute it and/or | |
7 * modify it under the terms of the GNU Lesser General Public | |
8 * License as published by the Free Software Foundation; either | |
9 * version 3 of the License, or (at your option) any later version. | |
10 * | |
11 * This library is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * Lesser General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU Lesser General Public | |
17 * License along with this library; if not, write to the Free Software | |
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
19 * MA 02110-1301 USA | |
20 */ | |
21 | |
22 /** | |
23 * @class DataloaderGui | |
24 * Dataloader GUI Implementation | |
25 * @author Sebastian Kruse (skruse@mpiwg-berlin.mpg.de) | |
26 * | |
27 * @param {DataloaderWidget} parent Dataloader widget object | |
28 * @param {HTML object} div parent div to append the Dataloader gui | |
29 * @param {JSON} options Dataloader configuration | |
30 */ | |
31 function DataloaderGui(dataloader, div, options) { | |
32 | |
33 var dataloaderGui = this; | |
34 | |
35 this.dataloaderContainer = div; | |
36 this.dataloaderContainer.style.position = 'relative'; | |
37 | |
38 this.loaderTypeSelect = document.createElement("select"); | |
39 div.appendChild(this.loaderTypeSelect); | |
40 | |
41 this.loaders = document.createElement("div"); | |
42 div.appendChild(this.loaders); | |
43 | |
44 $(this.loaderTypeSelect).change(function(){ | |
45 var activeLoader = $(this).val(); | |
46 $(dataloaderGui.loaders).find("div").each(function(){ | |
47 if ($(this).attr("id") == activeLoader) | |
48 $(this).show(); | |
49 else | |
50 $(this).hide(); | |
51 }); | |
52 }); | |
53 }; |