Project

General

Profile

« Previous | Next » 

Revision 1034

Added by aldus almost 15 years ago

FCK-Editor Modul: Droplet Select: change "page_list_block" to "droplets_list_block", also "cmbPages" to "cmbDroplets"
as we are listen droplets not pages.
Minor cosmetic changes in the source to get it more redable

View differences:

wbdroplets.htt
3 3
<html>
4 4
	<head>
5 5
		<title>WB Link - Insert Website Baker Droplet</title>
6
		<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}">
7
		<meta content="noindex, nofollow" name="robots">
6
		<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
7
		<meta name="robots" content="noindex, nofollow" />
8 8
		<script type="text/javascript" src="fckwbdroplets.js"></script>
9 9
		<script type="text/javascript">
10 10
		<!--
......
36 36
				} else {
37 37
					sSelected = FCK.EditorDocument.selection.createRange().text;
38 38
				}
39

  
40

  
41 39
			}
42 40

  
43 41
			//Code that runs after the OK button is clicked 
44 42
			function Ok() {
45 43
				//Validate is option is selected
46
				var oPageList = document.getElementById( 'cmbPages' ) ;
47
				if(oPageList.selectedIndex == -1) {
44
				var oDropletList = document.getElementById( 'cmbDroplets' ) ;
45
				if(oDropletList.selectedIndex == -1) {
48 46
					alert( FCKLang.WBDropletsErrPageSelect );
49 47
					return false;
50 48
				}
51 49
				
52 50
				var oTagLink = document.getElementById( 'chkTaglink' );
53 51
				
54
				var sPageId = oPageList[oPageList.selectedIndex].value;
55
				FCK.InsertHtml("[[" + sPageId + "]]");
52
				var sDropletStr = oDropletList[oDropletList.selectedIndex].value;
53
				FCK.InsertHtml("[[" + sDropletStr + "]]");
56 54
				// the following line was commented out as it creates an error message in some browser (e.g. IE)
57 55
				// even Firefox seems not to make use of the title so we remove this option for know (doc)
58 56
				// SetAttribute( oLink, 'title', document.getElementById( 'txtTitle' ).value ) ;
59 57
			return true;
60 58

  
61
			} 
59
			}
60
			
62 61
			var oldid = 'LoginBox';
62
			
63 63
			function showdetail(obj) {
64 64
				var olditem = document.getElementById(oldid);
65
  				var newitem = document.getElementById(obj.value);
66
  				olditem.className='hidden';
67
  				newitem.className='unhidden';
65
				var newitem = document.getElementById(obj.value);
66
				olditem.className='hidden';
67
				newitem.className='unhidden';
68 68
				oldid = obj.value;
69 69
			}
70 70
		//-->
......
74 74
			.unhidden { display: block; }
75 75
		</style>
76 76
	</head>
77
			
78 77
	<body scroll="yes" >
79
		 <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> 
80
		 	<tr> 
78
		<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> 
79
			<tr> 
81 80
				<td>
82 81
					<table width="100%">
83 82
						<tr> 
......
85 84
						</tr>
86 85
						<tr>
87 86
							<td colspan="2">
88
								<select id="cmbPages" style="WIDTH: 100%" size="10" name="cmbPages"  onchange="javascript:showdetail(this);" >
89
									<!-- BEGIN page_list_block -->
87
								<select id="cmbDroplets" style="WIDTH: 100%" size="10" name="cmbDroplets"  onchange="javascript:showdetail(this);" >
88
									<!-- BEGIN droplets_list_block -->
90 89
									<option value="{TITLE}"{SELECTED}>{TITLE}</option>
91
									<!-- END page_list_block -->
90
									<!-- END droplets_list_block -->
92 91
								</select>
93 92
							</td>
94 93
						</tr>
......
96 95
					{LIST}
97 96
				</td>
98 97
			</tr>
99
		</table>
100
		
98
		</table>		
101 99
	</body>
102 100
</html> 
103 101
<!-- END main_block -->

Also available in: Unified diff