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
| define([
| 'dojo/_base/declare',
| 'dojo/_base/lang',
| 'dojo/_base/html',
| "dojo/topic",
| "dojo/dom",
| 'dijit/_WidgetBase',
| 'dijit/_TemplatedMixin',
| "dojo/text!./GeologicalDisasterPanel.html"
| ],
| function(
| declare,
| lang,
| html,
| topic,
| dom,
| _WidgetBase,
| _TemplatedMixin,
| template
| ) {
| return declare('GeologicalDisasterPanel', [_WidgetBase, _TemplatedMixin], {
|
| templateString: template,
|
| width: 270,
| constructor: function(args) {
| declare.safeMixin(this, args);
| },
| postCreate: function () {
| this.inherited(arguments);
| // this.name.innerHTML = this.data.name||"--";
| // $(this.domNode).find('#oo').html('3333333333');
| $(this.domNode).find(".tab li").click(function(){
| $(this).parent(".tab").children("li").eq($(this).index()).addClass("activ").siblings().removeClass("activ");
| $(this).parent(".tab").next(".tabCon").children("div").hide().eq($(this).index()).show();
| })
|
| $(this.domNode).find("#i1").attr('src', "widgets/Introduction/"+this.data.img);
| $(this.domNode).find("#js").html(this.data.content);
| if(this.data.qjdz){
| $(this.domNode).find("#qj").attr('src', this.data.qjdz);
| }
| else{
| $(this.domNode).find("#qjLi").css('display', "none");
| $(this.domNode).find("#qjDiv").css('display', "none");
| }
|
| if(this.data.audio){
| $(this.domNode).find("#bgMusic").attr('src',"widgets/Introduction/" + this.data.audio);
| }
| else{
| $(this.domNode).find("#bgMusic").css('display', "none");
| }
|
| }
|
|
| });
| });
|
|