forked from eendrulat/map-and-app-gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmapps.html
More file actions
1829 lines (1630 loc) · 88.4 KB
/
mapps.html
File metadata and controls
1829 lines (1630 loc) · 88.4 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset=utf-8>
<!--
| Version 10.2
| Copyright 2012 Esri
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
-->
<meta http-equiv="X-UA-Compatible" content="IE=9">
<title>Maps and Apps</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dijit/themes/claro/claro.css"></link>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojox/widget/Portlet/Portlet.css"></link>
<link rel="stylesheet" href="configuration/styles.css"></link>
<link rel="stylesheet" href="modules/structural.css"></link>
</head>
<body id="pageBody" class="claro overallSite startupBkgd">
<noscript>
<div class="noJavaScriptMessage">
<span>This site requires JavaScript.</span>
</div>
</noscript>
<!-- Create a frame that's impervious to Google Translate's shifting of the
body. The Google Translate menu bar now stomps on the top of the page rather
than shifting the page 40px off the bottom. -->
<div id="overallPage" class="hidden transparent">
<!-- Normally-displayed content -->
<div id="mainContainer" data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'headline',gutters:false">
<!-- Floating center area -->
<div class="mainFrame roundedMainFrame shadow" data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="region:'center',gutters:false">
<!-- Banner -->
<header>
<div class="banner" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
<a id="govtMain" target="_blank"><img id="logo" class="logo" src="configuration/logo.png" /></a>
<img class="titleSeparator" src="graphics/separator.png" title="vertical separator line" />
<span id="mainTitle" class="title">Maps</span>
<div class="rightHeader">
<div class="searchBoxGroup">
<div class="searchBoxOverlapper">
<div id="searchBox" data-dojo-type="dijit.form.TextBox"
data-dojo-props="placeHolder:'Search Gallery',intermediateChanges:true">
</div>
</div>
<span class="searchBoxOverlapper" onclick="updateSearchTerm();">
<img src="graphics/magnifier.png" class="searchBoxIcon" title="Search map gallery"/>
</span>
<div id="translateBox"><div id="google_translate_element"></div></div>
</div>
</div>
</div>
</header>
<!-- Content pages -->
<div id="contentPages" class="fullHeight noPad" data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="region:'center',design:'headline',gutters:false">
<!-- Subpage switcher (i.e., tab bar) -->
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
<nav>
<div id="tabBarExpander" class="tabBarExpanded rounded">
<div id="tabBar"><span title="Home" class="tabBarTitle" onclick="changeSubpage('Home',true)">Home</span><img src="graphics/separator.png" /><span title="Gallery" class="tabBarTitle" onclick="changeSubpage('Gallery',false)">Gallery</span><img src="graphics/separator.png" /><span title="Submit Your App" class="tabBarTitle" onclick="changeSubpage('SubmitApp',false)">Submit Your App</span><img src="graphics/separator.png" /><span title="About" class="tabBarTitle" onclick="changeSubpage('About',true)">About</span></div>
<div id="tabBarExpandedImageFrame">
<img id="tabBarExpandedImage" src="configuration/home_image.png" title="city view">
</div>
</div>
</nav>
</div><!-- Subpage switcher (i.e., tab bar) -->
<!-- Subpages -->
<div data-dojo-type="dijit.layout.StackContainer"
data-dojo-props="region:'center',id:'contentStack'">
<!-- Home -->
<div id="Home" data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="title:'Home'">
<div class="subpage" data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'headline',gutters:false">
<!-- Left column popularity list -->
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'left'">
<div class="absoluteContainer sideColumn fullHeight noPad sideColumnBkgd rounded">
<div id="homeMostPopularTitleBar" class="titleBar roundedTop">
<span class="titleBarTitle">Most Popular</span>
</div>
<img id="homeMostPopularLoading" class="panelLoadingIndicator" src="graphics/loading.gif"/>
<div id="mostPopularList" class="hidden">
<div id="galleryMostPopular"></div>
</div>
</div>
</div><!-- Left column popularity list -->
<!-- Center column of cycling highlight images -->
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
<div class="columnPadLeft columnPadRight fullHeight noPad">
<div id="homeHighlightsFrame" class="absoluteContainer fullHeight noPad rounded">
<div id="homeHighlightsTitleBar" class="titleBar roundedTop">
<span class="titleBarTitle">Most Recent</span>
</div>
<img id="homeHighlightsLoading" class="panelLoadingIndicator" src="graphics/loading.gif"/>
<div id="highlightsGallery">
<div class="fullWidth centered">
<table class="fullWidth" cellspacing="4px" border="0px" cellpadding="0px">
<tr id="rotatorThumbs"/>
<tr id="rotatorFocus"/>
</table>
</div>
</div>
</div>
</div>
</div><!-- Center column of cycling highlight images -->
<!-- Right column small stuff -->
<div data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'right'">
<div class="sideColumn fullHeight noPad" data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'headline',gutters:false">
<!-- What's New -->
<div data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'center'">
<div class="absoluteContainer sideColumnBkgd rounded fullHeight noPad">
<div id="homeWhatsNewTitleBar" class="titleBar roundedTop">
<span class="titleBarTitle">What's New</span>
</div>
<div id="newsfeedContainer"><div id="newsfeedPlaceholder"></div></div>
</div>
</div><!-- What's New -->
<!-- Stay Connected -->
<div data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'bottom'">
<div class="columnPadTop">
<div id="homeStayConnectedFrame" class="sideColumnBkgd rounded">
<div id="homeStayConnectedTitleBar" class="titleBar">
<span class="titleBarTitle">Stay Connected</span>
</div>
<div class="fullHeight inset">
<nav><span id="socialNavigation"></span></nav>
</div>
</div>
</div>
</div><!-- Stay Connected -->
</div>
</div><!-- Right column small stuff -->
</div>
</div><!-- Home -->
<!-- Gallery -->
<div id="Gallery" data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="title:'Gallery'">
<div class="subpage" data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'sidebar',gutters:false">
<!-- Left column list of categories & types -->
<div data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'left'">
<div class="fullHeight noPad sideColumnBkgd rounded">
<div id="mapGalleryLeftCol" class="absoluteContainer sideColumn fullHeight noPad rounded">
<div id="mapGalleryLeftColFrame" data-dojo-type="dijit.layout.ContentPane">
<div id="mapGalleryLeftColTitle">Gallery</div>
<div id="galleryCategories"></div>
<div id="galleryTypes"></div>
</div>
</div>
</div>
</div>
<!-- Center column display of the gallery as a set of tiles -->
<div id="museum" data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'center'">
<div class="columnPadLeft fullHeight noPad">
<div class="fullHeight noPad">
<div id="gallery" class="fillParent" data-dojo-type="dijit.layout._LayoutWidget">
<div id="galleryLoading">
<strong>Loading Maps and Apps...</strong>
<img width="20px" height="20px" title="Animation for loading page"
src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojox/image/resources/images/loading.gif"><br>
</div>
<div id="galleryEmpty" class="absent">No items were found</div>
</div>
</div>
</div>
</div><!-- Center column display of the gallery as a set of tiles -->
</div>
</div><!-- Gallery -->
<!-- Submit Your App -->
<div id="SubmitApp" data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="title:'Submit Your App'">
<div class="subpage" data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'headline',gutters:false">
<div class="fullHeight noPad" data-dojo-type="dijit.layout.SplitContainer"
data-dojo-props="region:'center',orientation:'horizontal',splitter:'true'">
<!-- Left column rules -->
<div data-dojo-type="dijit.layout.ContentPane">
<div class="fullHeight noPad sideColumnBkgd rounded">
<div id="submissionLeftCol" class="absoluteContainer fullHeight noPad rounded">
<div id="submissionLeftColFrame" data-dojo-type="dijit.layout.ContentPane">
<div id="submissionLeftColTitle">Submit Your Application</div>
<div id="categories" class="submissionLeftColSubtitle">Submission Rules</div>
<div class="submissionLeftColContent">
In order to be considered, each submission must include:
<ol>
<li>A link to the working software application</li>
<li>A text-based description of the application</li>
<li>A thumbnail image of the application</li>
</ol>
</div>
<div id="types" class="submissionLeftColSubtitle">Additional Rules</div>
<div class="submissionLeftColContent">
Submissions must also:
<ol>
<li>Be original software apps solely owned by the applicant</li>
<li>Use at least one of the maps or datasets found in the Gallery</li>
<li>Be free to the public, or have a clearly defined fee structure</li>
<li>Recognize that the City reserves the right to restrict access to the Gallery</li>
</ol>
</div>
</div>
</div>
</div>
</div><!-- Left column rules -->
<!-- Right column submission form -->
<div data-dojo-type="dijit.layout.ContentPane">
<div class="columnPadLeft fullHeight noPad">
<div class="absoluteContainer fullHeight noPad">
<div id="submissionFormFrame" data-dojo-type="dijit.layout.ContentPane">
<div id="submissionFormNotAvailable" class="absent">
At this time, the submission of maps and apps from the Opera, 64-bit Internet Explorer, or Internet Explorer <9 browsers is not available.
</div>
<form class="fullWidth" data-dojo-type="dijit.form.Form" id="submissionForm" jsId="submissionForm"
enctype="multipart/form-data" method="post">
<table id="submissionFormTable" cellspacing="10">
<tr>
<td>
<label for="title">Application Name:</label>
</td>
<td>
<input type="text" data-dojo-type="dijit.form.TextBox"
data-dojo-props="id:'title',name:'title',trim:true,required:true,intermediateChanges:true">
</input>
</td>
</tr>
<tr>
<td>
<label for="accessInformation">Submitted By:</label>
</td>
<td>
<input type="text" data-dojo-type="dijit.form.TextBox"
data-dojo-props="id:'accessInformation',name:'accessInformation',trim:true,required:true,intermediateChanges:true">
</input>
</td>
</tr>
<tr>
<td>
<label for="description">Description:</label>
</td>
<td>
<input type="text" data-dojo-type="dijit.form.SimpleTextarea"
data-dojo-props="id:'description',name:'description',trim:true,required:true,intermediateChanges:true">
</input>
</td>
</tr>
<tr>
<td>
<label for="pcategory">Category:</label>
</td>
<td>
<input id="pcategory">
</td>
</tr>
<tr>
<td>
<label for="ptype">Type:</label>
</td>
<td>
<input id="ptype">
</td>
</tr>
<tr>
<td>
<label for="url">Try It URL:</label>
</td>
<td>
<input type="text" data-dojo-type="dijit.form.TextBox"
data-dojo-props="id:'url',name:'url',trim:true,required:true,intermediateChanges:true">
</input>
</td>
</tr>
<tr>
<td>
<label for="thumbnail">Thumbnail Image:</label>
</td>
<td>
<input id="thumbnail" name="thumbnail" type="file"
data-dojo-type="dojox.form.Uploader" label="Select an image file..."
url="UploadFile.ashx"
multiple="false" uploadOnSelect="false" force="iframe" />
<div id="uploadedfileEchoFrame">
<span id="uploadedfileEcho"></span>
</div>
<div id="uploadedfileHint">For best results, the image should be 200 pixels wide by 133 pixels high. Other sizes will be adjusted to fit. Acceptable image formats are: PNG, GIF and JPEG.</div>
</td>
</tr>
<tr>
<td>
<div id="uploadStatus" class="absoluteContainer">
<img id="uploadingActive" class="absoluteOrigin absent" src="graphics/uploadActive.gif">
<div id="uploadingSuccessful" class="absoluteOrigin absent">
<img class="absoluteOrigin" src="graphics/upload.png">
<img class="absoluteOrigin" src="graphics/ok.png">
</div>
<div id="uploadingFailed" class="absoluteOrigin absent">
<img class="absoluteOrigin" src="graphics/upload.png">
<img class="absoluteOrigin" src="graphics/fail.png">
</div>
</div>
</td>
<td>
<input id="item" name="item" value="" type="hidden" data-dojo-type="dijit.form.TextBox"/>
<input id="snippet" name="snippet" value="" type="hidden" data-dojo-type="dijit.form.TextBox"/>
<input id="type" name="type" value="Web Mapping Application" type="hidden" data-dojo-type="dijit.form.TextBox"/>
<input id="typeKeywords" name="typeKeywords" value="Ready To Use,Other" type="hidden" data-dojo-type="dijit.form.TextBox"/>
<input id="tags" name="tags" value="" type="hidden" data-dojo-type="dijit.form.TextBox"/>
<input id="licenseInfo" name="licenseInfo" type="hidden" data-dojo-type="dijit.form.TextBox"/>
<input id="text" name="text" value="" type="hidden" data-dojo-type="dijit.form.TextBox"/>
<button id="submitButton" value="Submit" type="submit" data-dojo-type="dijit.form.Button">Submit form</button>
<button id="resetButton" data-dojo-type="dijit.form.Button" onclick="resetForm(true);">Reset form</button>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div><!-- Right column submission form -->
</div>
</div>
</div><!-- Submit Your App -->
<!-- About -->
<div id="About" data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="title:'About'">
<div class="subpage" data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'headline',gutters:false">
<!-- Left column is empty; provides visual balance -->
<div data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'left'">
<div id="supportLeftCol" class="sideColumn fullHeight noPad rounded">
</div>
</div>
<!-- Center column's About -->
<div data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'center'">
<div class="columnPadLeft columnPadRight fullHeight">
<div class="fullHeight insetSides">
<div class="absoluteContainer fullHeight">
<div class="titleBar">
<span id="aboutTitle">About</span>
</div>
<div id="aboutFrame"></div>
</div>
</div>
</div>
</div><!-- Center column's About -->
<!-- Right column small stuff -->
<div class="sideColumn fullHeight noPad" data-dojo-type="dijit.layout.SplitContainer"
data-dojo-props="region:'right',orientation:'vertical',splitter:'true'">
<!-- Support -->
<div data-dojo-type="dijit.layout.ContentPane">
<div class="absoluteContainer fullHeight noPad sideColumnBkgd rounded">
<div id="supportTitleBar" class="titleBar roundedTop">
<span class="titleBarTitle">Support</span>
</div>
<div id="supportFrame"></div>
</div>
</div><!-- Support -->
<!-- Additional Contact Info -->
<div data-dojo-type="dijit.layout.ContentPane">
<div class="absoluteContainer fullHeight noPad sideColumnBkgd rounded">
<div id="supportAdditionalContact" class="titleBar roundedTop">
<span id="supportAdditionalContactTitle" class="titleBarTitle">Additional Contact Info</span>
</div>
<div id="supportAdditionalContactFrame"></div>
</div>
</div><!-- Additional Contact Info -->
</div><!-- Right column small stuff -->
</div>
</div><!-- About -->
</div><!-- Subpages -->
</div><!-- Content pages -->
</div><!-- Floating center area -->
<!-- Footer -->
<footer>
<div class="footer" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'bottom'">
<nav><span id="leftFooterNavigation" class="leftFooter"></span></nav>
<nav><span id="rightFooterNavigation" class="rightFooter"></span></nav>
</div>
</footer><!-- Footer -->
</div><!-- Normally-displayed content -->
</div>
<!-- Dialogs; these are outside the overallPage <div> because Dojo is going to move them out anyway -->
<!-- Gallery details dialog -->
<div id="detailsDialog" data-dojo-type="dijit.Dialog" data-dojo-props="title:''" class="hidden">
<div id="detailsDialogFrame" data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'sidebar',gutters:false">
<!-- Left column summary -->
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'left'">
<div id="detailsLeftCol" class="sideColumn fullHeight noPad rounded">
<div class="fullHeight inset">
<img id="detailsDialogImage" class="fullWidth">
<div class="detailsLeftColTitles">Category:</div>
<div id="detailsDialogCategory" class="detailsLeftColEntries"></div>
<div class="detailsLeftColTitles">Type:</div>
<div id="detailsDialogType" class="detailsLeftColEntries"></div>
<div class="detailsLeftColTitles">Submitted By:</div>
<div id="detailsDialogSubmittedBy" class="detailsLeftColEntries"></div>
</div>
</div>
</div><!-- Left column summary -->
<!-- Center image and reviews -->
<div class="fullHeight" data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'center'">
<div class="fullHeight insetSides">
<div class="fullHeight" data-dojo-type="dijit.layout.SplitContainer"
data-dojo-props="orientation:'vertical',splitter:'true'">
<!-- Description -->
<div data-dojo-type="dijit.layout.ContentPane">
<div class="fullHeight">
<div class="absoluteContainer fullHeight">
<div id="detailsDialogTitleBar" class="titleBar">
<span id="detailsDialogTitle"></span>
</div>
<div class="detailsDialogDescriptionFrame">
<div class="detailsDialogDescriptionParagraph">
<span id="detailsDialogDescription"></span>
</div>
</div>
</div>
</div>
</div><!-- Description -->
<!-- Reviews -->
<div data-dojo-type="dijit.layout.ContentPane">
<div class="fullHeight">
<div class="absoluteContainer fullHeight sideColumnBkgd rounded">
<div id="detailsCenterColReviewTitleBar" class="titleBar roundedTop">
<span class="titleBarTitle">Reviews</span>
</div>
<div id="detailsDialogReviews">
<div id="detailsDialogWriteReviewFrame" onclick="writeAReview();">
<img src="graphics/draw.gif" title="Write a review" />
<span id="detailsDialogWriteReviewLink">Write a review</span>
</div>
<hr />
<div class="detailsDialogReviewsListFrame">
<div id="detailsDialogReviewsList"></div>
</div>
</div>
</div>
</div>
</div><!-- Reviews -->
</div>
</div>
</div><!-- Center image and reviews -->
<!-- Right column small stuff -->
<div id="detailsRightCol" data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'right'">
<!-- Rating -->
<div class="columnPadBottom">
<div id="detailsRightColRating" class="sideColumnBkgd rounded">
<div id="detailsRightColRatingTitleBar" class="titleBar">
<span class="titleBarTitle">Rating</span>
</div>
<div class="fullHeight inset">
<img id="detailsDialogRatingImg" src="graphics/rating0.png" title="rating stars"><br />
<div id="detailsDialogRatingSlider" data-dojo-type="dijit.form.HorizontalSlider" value="0"
minimum="0" maximum="5" discreteValues="6" intermediateChanges="true"
showButtons="true" disabled="true">
</div>
</div>
</div>
</div><!-- Rating -->
<!-- Try it -->
<div class="columnPadBottom">
<div id="detailsRightColTryIt" class="sideColumnBkgd rounded">
<div id="detailsRightColTryItTitleBar" class="titleBar">
<span class="titleBarTitle">Try it</span>
</div>
<div class="fullHeight inset">
<div>
<a id="detailsRightColTryItLink" title="Try it"
href="mapps.html" target="_blank">Try it</a>
</div>
</div>
</div>
</div><!-- Try it -->
<!-- Support it -->
<div class="columnPadBottom">
<div id="detailsRightColSupportIt" class="sideColumnBkgd rounded">
<div id="detailsRightColSupportItTitleBar" class="titleBar">
<span class="titleBarTitle">Support it</span>
</div>
<div class="fullHeight inset">
<nav><span id="itemSocialNavigation"></span></nav>
</div>
</div>
</div><!-- Support it -->
</div><!-- Right column small stuff -->
</div>
</div><!-- Gallery details dialog -->
<!-- Write a review dialog -->
<div id="reviewDialog" data-dojo-type="dijit.Dialog" data-dojo-props="title:'Write a review'" class="hidden">
<div id="reviewFormFrame" data-dojo-type="dijit.layout.ContentPane">
<table cellspacing="10">
<tr>
<td style="width:205px">
<input id='reviewDialogText' type="text" data-dojo-type="dijit.form.SimpleTextarea"
data-dojo-props="intermediateChanges:true,trim:true,rows:'4',cols:'30',maxLength:140">
</input>
</td>
<td id="reviewFormButtonFrame">
<span id='reviewDialogDate' class='detailsReviewDate'></span><hr />
<button id='reviewDialogSubmit' type='button' data-dojo-type="dijit.form.Button">Submit</button><br />
<button id='reviewDialogCancel' type='button' data-dojo-type="dijit.form.Button">Cancel</button>
</td>
</tr>
</table>
</div>
</div><!-- Write a review dialog -->
<script>
var path_location = location.pathname.replace(/\/[^/]+$/, '');
var dojoConfig = {
packages: [{
name: "configuration",
location: path_location + '/configuration'
},{
name: "modules",
location: path_location + '/modules'
}],
async: false,
parseOnLoad: true
};
</script>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojo/dojo.js"></script>
<script>
var currentPage = 'Home';
var configData = null;
var galleryData = null;
var galleryItems;
var numMapsAndApps = 0;
var currentCategory = null;
var currentType = null;
var currentTerm = null;
var currentDetailsId = null;
//var currentDetailsItem = null;//???
//var currentSumRatings = 0; //???
//var currentNumRatings = 0; //???
var configDependentInitReady = false;
var configIndependentInitReady = false;
var mostRecentItems = new Array();
var currentMostRecentItem = -1;
var disableThumbnailUpload = true;
var MapsAppsTileConstructor;
// Manage a "loading" indicator to hide dojo reworking of UI
// We'll pull this part of dojo in quickly, then get the rest
require(["dojo/window"], function () {
showLoading();
require([
"dojo/ready",
"modules/ArcGISSearchStore",
"modules/MapsAppsTile",
"dijit/Dialog",
"dijit/dijit",
"dijit/form/Button",
"dijit/form/ComboBox",
"dijit/form/FilteringSelect",
"dijit/form/Form",
"dijit/form/Select",
"dijit/form/SimpleTextarea",
"dijit/form/Slider",
"dijit/form/TextBox",
"dijit/layout/_LayoutWidget",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dijit/layout/SplitContainer",
"dijit/layout/StackContainer",
"dojo/data/ItemFileReadStore",
"dojox/form/Uploader",
"dojox/widget/FeedPortlet",
"dojox/widget/Portlet",
"dojox/widget/rotator/Fade",
"dojox/form/Uploader",
"dojox/form/uploader/plugins/IFrame"
], function (ready, ArcGISSearchStore, MapsAppsTile) {
ready(function () {
disableThumbnailUpload = dojo.isOpera
|| (dojo.isIE && (dojo.isIE < 9 || "x64" == window.navigator.cpuClass));
MapsAppsTileConstructor = MapsAppsTile;
// Fetch the configuration information. We have two parallel tracks of initialization here:
// that which is dependent upon the config file and that which is independent
//---------- depends on config file ----------
require(["configuration/config"], function (Configuration) {
configData = new Configuration();
// Prep the cycle interval for the most recent items
if(!configData.mostRecentCycleInterval) configData.mostRecentCycleInterval = 3;
if(0.5 > configData.mostRecentCycleInterval) configData.mostRecentCycleInterval = 0.5;
configData.mostRecentCycleInterval *= 1000;
// Create the gallery data store
galleryData = new ArcGISSearchStore({
groupId: configData.galleryGroupId
});
// Get the gallery data. We'll chain the three calls (for the Most Popular & Most Recent
// sections of the main page and for the Gallery page) so that we can use one fetch of
// data for all three. Otherwise, all three fetch calls are made before the data arrives
// and we end up making three fetches.
galleryData.fetch({
sort: [{attribute: "numViews", descending: true}],
start: 0, count: 7,
onComplete: function(items, request){
// Most Popular
showPopular(items, request);
galleryData.fetch({
sort: [{attribute: "modified", descending: true}],
start: 0, count: 4,
onComplete: function(items, request){
// Most Recent
showRecent(items, request);
// Gallery page
updateGallery(null, null, null);
}
});
}
});
// Fill in the custom text
dojo.byId("mainTitle").innerHTML = configData.mainTitle;
dijit.byId("searchBox").set("placeHolder", configData.searchBoxPrompt);
customizeLink("govtMain", configData.govtMainLabel, configData.govtMainLink);
addNavigation("leftFooterNavigation", configData.leftFooterNavigation);
addNavigation("rightFooterNavigation", configData.rightFooterNavigation);
addNavigation("socialNavigation", configData.socialNavigation);
addNavigation("itemSocialNavigation", configData.itemSocialNavigation);
if(configData.newsfeedLink && 0 < configData.newsfeedLink.length)
{
var newsFeed = new dojox.widget.ExpandableFeedPortlet({
title: configData.govtDisplayName,
id: 'newsPortlet',
url: configData.newsfeedLink,
maxresults: 20,
local: false,
closable: false,
toggleable: false
}, "newsfeedPlaceholder");
newsFeed.load();
if(configData.govtDisplayName) {
patchFeedTitle(newsFeed, configData.govtDisplayName);
}
dojo.style("newsPortlet", "visibility", "visible");
dojo.style("newsPortlet", "height", "100%");
}
else if(configData.newsItems)
{
var content = "<ul>";
dojo.forEach(configData.newsItems.items, function(item){
content += "<li>" + item.title + "</li>";
});
content += "</ul>";
dojo.byId("newsfeedPlaceholder").innerHTML = content;
}
customizeLink("detailsFacebook", configData.govtFacebookLabel, configData.govtFacebookLink);
customizeLink("detailsTwitter", configData.govtTwitterLabel, configData.govtTwitterLink);
var categorySelector =
new dijit.form.FilteringSelect({
id: "pcategory",
store: new dojo.data.ItemFileReadStore({
data: configData.appCategories
}),
searchAttr: "name",
autoComplete: true,
required: true,
intermediateChanges: true,
value: ""
},
"pcategory");
dojo.connect(dijit.byId("pcategory"), "onChange", updateSubmitResetButtons);
var typeSelector =
new dijit.form.FilteringSelect({
id: "ptype",
store: new dojo.data.ItemFileReadStore({
data: configData.appTypes
}),
searchAttr: "name",
autoComplete: true,
required: true,
intermediateChanges: true,
value: ""
},
"ptype");
dojo.connect(dijit.byId("ptype"), "onChange", updateSubmitResetButtons);
dijit.byId("licenseInfo").set("value", configData.govtFormalName);
addAbout("aboutFrame", configData.about);
addContactInfo("supportFrame", configData.supportContact);
addContactInfo("supportAdditionalContactFrame", configData.additionalContact);
// Adjust display parameters
if(configData.displayRules.bannerImageStretchesToFit) dojo.style("tabBarExpandedImage", "width", "100%");
// Add the Google Translate widget if desired
if(configData.displayRules.alternateLanguages) {
var script = document.createElement("script");
script.src = "http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit";
script.type = "text/javascript";
document.getElementsByTagName("head")[0].appendChild(script);
}
// Upload the image file when the form is submitted, then do the actual form submit
dojo.connect(dijit.byId("thumbnail"), "onBegin", function(event) {
// Try to block multiple submissions
dijit.byId("submitButton").set("disabled", true);
dijit.byId("resetButton").set("disabled", true);
});
dojo.connect(dijit.byId("thumbnail"), "onError", function(event) {
dojo.style("uploadingActive", "display", "none");
dojo.style("uploadingFailed", "display", "block");
resetForm(false);
});
dojo.connect(dijit.byId("thumbnail"), "onComplete", function(event) {
dojo.style("uploadStatus", "display", "block");
dojo.style("uploadingActive", "display", "block");
if(event && 0 < event.length && !event[0].error)
{
// Submit the rest of the form once we're done with uploading the image.
// Have to do it like this for IE; Firefox, Chrome, & Safari can handle it in parallel
prepareFormForSubmission(event[0].name);
var urlSuffix = "";
if(dojo.isIE)
{
urlSuffix = "&unique=" + (new Date()).getTime();
}
// The parameters to pass to xhrPost, the form, how to handle it, and the callbacks.
var xhrArgs = {
form: dojo.byId("submissionForm"),
url: "proxy.ashx?http://www.arcgis.com/sharing/content/users/" +
configData.galleryOwner + "/addItem?f=json",
handleAs: "text",
accept: ["image/png","image/jpeg","image/gif"],
headers: {"X-Requested-With": ""}, // avoid conversion from POST to OPTION; cf http://trac.dojotoolkit.org/changeset/20403
load: function(data) {
data = JSON.parse(data);
if(data.success)
{
dojo.style("uploadingActive", "display", "none");
dojo.style("uploadingSuccessful", "display", "block");
}
else
{
dojo.style("uploadingActive", "display", "none");
dojo.style("uploadingFailed", "display", "block");
}
},
error: function(error) {
dojo.style("uploadingActive", "display", "none");
dojo.style("uploadingFailed", "display", "block");
}
}
// Call the asynchronous xhrPost
var deferred = dojo.xhrPost(xhrArgs);
}
else
{
dojo.style("uploadingActive", "display", "none");
dojo.style("uploadingFailed", "display", "block");
}
resetForm(false);
});
// Show the site by hiding the loading background
configDependentInitReady = true;
hideLoading();
});
//---------- independent of config file ----------
// Watch for resizes so that we can change the dimensions of the gallery to keep it
// in a vertical column only
window.onresize = function(event) {
handleResize();
}
// Watch for typing in Search box
dojo.connect(dijit.byId("searchBox"), "onChange", updateSearchTerm);
// Links for write-a-review dialog
dijit.byId("reviewDialogSubmit").set("disabled", true);
dojo.connect(dijit.byId("reviewDialogText"), "onChange", updateReviewDialogButtons);
dojo.connect(dijit.byId("reviewDialogSubmit"), "onClick", submitReviewDialog);
dojo.connect(dijit.byId("reviewDialogCancel"), "onClick", hideReviewDialog);
// Activate the rating stars when the rating slider is changed
dojo.connect(dijit.byId("detailsDialogRatingSlider"), "onChange", function(newValue) {
dojo.byId("detailsDialogRatingImg").src = "graphics/rating" + newValue + ".png";
});
// Set initial conditions in submit form
if(disableThumbnailUpload)
{
dojo.addClass("submissionForm", "absent");
dojo.removeClass("submissionFormNotAvailable", "absent");
}
// Update the image file name after a selection of an image file
dojo.connect(dijit.byId("thumbnail"), "onChange", function(event) {
dojo.byId("uploadedfileEcho").innerHTML = event && 0 < event.length ? encodeURIComponent(event[0].name) : "";
updateSubmitResetButtons();
});
dojo.connect(dijit.byId("title"), "onChange", updateSubmitResetButtons);
dojo.connect(dijit.byId("accessInformation"), "onChange", updateSubmitResetButtons);
dojo.connect(dijit.byId("description"), "onChange", updateSubmitResetButtons);
dojo.connect(dijit.byId("url"), "onChange", updateSubmitResetButtons);
updateSubmitResetButtons();
// Prevent the details dialog from being dragged to get around a bug that prevents the close button
// from working on an iPad (http://bugs.dojotoolkit.org/ticket/13488)
dijit.byId("detailsDialog").draggable = false;
// Show the site by hiding the loading background
configIndependentInitReady = true;
hideLoading();
});
});
});
function showLoading(){
// Set up a background and a loading gif in the center of the screen
// Adapted from http://acuriousanimal.com/blog/category/dojo/
var ws = dojo.window.getBox();
var loadingImgDiv = dojo.create("div",
{id:"loadingImgFrame",style:{width:ws.w+"px",height:ws.h+"px"}},
dojo.body());
var loadingImg = dojo.create("img",
{id:"loadingImg",src:"graphics/loading.gif",style:{visibility:"hidden",position:"absolute"}},
loadingImgDiv);
dojo.connect(loadingImg, "onload", function(){
var ps = dojo.position(loadingImg);
dojo.style(loadingImg, "top" , (ws.h/2-ps.h/2)+"px");
dojo.style(loadingImg, "left", (ws.w/2-ps.w/2)+"px");
dojo.style(loadingImg, "visibility", "visible");
});
}
function hideLoading() {
// This routine is called from two places: the configuration that
// depends on waiting for the config file to be loaded and the
// configuration that's independent of the config file. Both need
// to be done before we hide the loading.
if(configDependentInitReady && configIndependentInitReady)
{
// Bring up the page and hide the loading gif
dojo.removeClass("overallPage", "hidden");
dojo.fadeIn({
node: "overallPage",
duration: 1000,
onEnd: function(){
dojo.removeClass("overallPage", "transparent");
dojo.addClass("overallPage", "opaque");
dojo.removeClass("pageBody", "startupBkgd");
dojo.removeClass("detailsDialog", "hidden");
dojo.removeClass("reviewDialog", "hidden");
}
}).play();
dojo.fadeOut({
node: "loadingImgFrame",
duration: 400,
onEnd: function(){
dojo.addClass("loadingImgFrame", "absent");
}
}).play();
}
}
function patchFeedTitle(newsFeed, govtDisplayName)
{
var feedNode = newsFeed;
var title = govtDisplayName;
setTimeout(doPatchFeedTitle, 3000);
function doPatchFeedTitle()
{
if(newsFeed.isLoaded){
newsFeed.titleNode.innerHTML = govtDisplayName;
}
}
}
function customizeLink(id, label, link)
{
var item = dojo.byId(id);
if(item)
{
if(label && 0 < label.length)
{
item.title = label;
item.href = link;
if(0 == item.innerHTML.length) item.innerHTML = label;
}
else
{
dojo.style(item, "display", "none");
}
}
}
function addNavigation(id, navigationData)
{
var item = dojo.byId(id);
if(item)
{
var contents = navigationData.label;
var first = true;
var usingIcons = false;
dojo.forEach(navigationData.items, function(item){