Project:
stringle
Code Location:
http://stringle.googlecode.com/svn/trunk/trunk
stringleToolSelect.php
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
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
<html> <head><title>Stringle Tool Selector</title> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.2.0/build/reset-fonts-grids/reset-fonts-grids.css"> <style type="text/css"> a {text-decoration:none;} h2 {font-size:150%; margin-bottom:10px;} hr {margin-top:10px;margin-bottom:20px;} em {font-style: italic;} blockquote {margin:40px; font-style: italic;} p {margin-top:10px;} #ft {margin-top:40px;} #hd h1 {font-size: 200%; margin-top:10px;} #bd {margin-top:40px;} #container li {margin-top:10px; margin-bottom:20px; } #toolTypes input {margin-right:10px;margin-left:20px;} .cb {margin-right:10px} .courseFeed h2 {font-size:140%} .courseFeed {margin-top:10px;border-style:solid;border-width:1px;padding:5px;} #delmark{margin-top:20px;} </style> <script type="text/javascript"> function handleToolUrls(){ var t=getToolUrls(); alert(t); } function cleanNode(nodeId){ var output = document.getElementById(nodeId); for (;output.childNodes.length>0;) output.removeChild(output.firstChild); } function gIDval(id){return document.getElementById(id).value;} function getToolUrls(){ var tft=document.toolsForm.stringleTool; var toolUrls="The aim is to bookmark these with a particular StringLE profile tag ("+gIDval('profileName')+"):\n"; for (var k=0;k<tft.length;k++) { if (tft[k].checked==true) { toolUrls+=tft[k].value+"\n"; } } return toolUrls; } </script> <script type="text/javascript" src="http://del.icio.us/feeds/json/psychemedia/stringle:tool?count=100"></script> </head> <body onload="getTools()"> <div id="doc" class="yui-t7"> <div id="hd"><h1>StringLE Tool Selector</h1></div> <div id="bd"> <div class="yui-g"> <h2>About</h2> <p><em>StringLE Tools</em> are third party online web applications that can be used within the StringLE environment.</p> <p>Web applications/tools that are appropriate for use within StringLE should be saved to delicious with the tag <em>stringle:tool</em>. Although the intention is to feed <em>all</em> bookmarked StringLE tools into this page, only a limited set are listed here at the current time. If you would like any of your preferred tools to be considered for inclusion here, please bookmark them on delicious with an additional <em>for:psychemedia</em> tag.</p> <hr /> <form name="toolsForm"> <div id="deliName">Your delicious Username: <input id="deliNameInput" type="text" size="20" value='ouseful' /> <label for="profileTag">Profile/tag name: <input id='profileName' type='textbox' size='20' /> <!-- <input type="button" value="Save Profile" onclick="handleToolUrls()" /> --> </div> <p>This information is used to generate the 'save this' links. If you have already bookmarked the resource, make it available to a <a href="stringleProfileSelect.php">StringLE Profile</a> by making sure that you have tagged it with the <em>stringle:tool</em> tag.</p> <hr /> <div id='toolTypes'> <input type='radio' name='tooltype' value="all" checked='checked' onchange="updateTools(this.value)" />All <input type='radio' name='tooltype' value="video" onchange="updateTools(this.value)"/>Video editors <input type='radio' name='tooltype' value="office" onchange="updateTools(this.value)"/>Office Tools <input type='radio' name='tooltype' value="audio" onchange="updateTools(this.value)"/>Audio Tools <input type='radio' name='tooltype' value="image" onchange="updateTools(this.value)"/>Photo/Image Editors <!-- <br /> <input type="button" value="View Recommended Tools" onclick="getTools()" /> --> </div> <div id="container"></div> </form> <script type="text/javascript"> // http://www.scriptygoddess.com/archives/2007/01/24/javascript-get-or-set-checked-radio-value/ // return the value of the radio button that is checked // return an empty string if none are checked, or // there are no radio buttons function getCheckedValue(radioObj) { if(!radioObj) return ""; var radioLength = radioObj.length; if(radioLength == undefined) if(radioObj.checked) return radioObj.value; else return ""; for(var i = 0; i < radioLength; i++) { if(radioObj[i].checked) { return radioObj[i].value; } } return ""; } function showImage(img){ return (function(){ img.style.display='inline'; }) } function bookmarkItem(url){ } function getBookmarkURL(u,d){ var deliUser=document.getElementById('deliNameInput').value; var tags=document.getElementById('profileName').value; window.open('http://del.icio.us/'+deliUser+'?url='+u+'&description='+d+'&tags=stringle:tool%20'+encodeURI(tags)); } function getTools(){ var ul = document.createElement('ul'); ul.setAttribute('id','itemList'); for (var i=0, post; post = Delicious.posts[i]; i++) { var li = document.createElement('li') li.setAttribute('class', post.t.join(' ')); var cb = document.createElement('input'); cb.setAttribute('type','checkbox'); cb.setAttribute('name','stringleTool'); cb.setAttribute('value',post.u); cb.setAttribute('class','cb'); var a = document.createElement('a') a.style.marginLeft = '20px' var img = document.createElement('img') img.style.position = 'absolute' img.style.display = 'none' img.height = img.width = 16 img.src = post.u.split('/').splice(0,3).join('/')+'/favicon.ico' img.onload = showImage(img); a.setAttribute('href', post.u) a.appendChild(document.createTextNode(post.d)) var s=document.createElement('a'); s.setAttribute('href','javascript:getBookmarkURL("'+encodeURI(post.u)+'","'+escape(post.d)+'")'); s.appendChild(document.createTextNode('Save this...')); //li.appendChild(cb) li.appendChild(img) li.appendChild(a) if (post.n){ var t = document.createTextNode(': '+post.n); li.appendChild(t) } li.appendChild(document.createTextNode(' ')); li.appendChild(s); ul.appendChild(li) } var c=document.getElementById('container'); cleanNode('container'); c.appendChild(ul); } function updateTools(toolType){ //alert(toolType+'\n'); var i=document.getElementById('itemList').getElementsByTagName('li'); for (j=0;j<i.length;j++) if ((toolType=='all')||(i[j].getAttribute('class').indexOf(toolType) != -1)) i[j].style.display='block'; else i[j].style.display='none'; //getSelector class //if all, display all //if particular selection, hide all not selected } //getTools(); </script> </div> </div> <div id="ft">Want to know more? <a href="http://ouseful.open.ac.uk/stringle"><em>StringLE Info</em></a></div> </div> </body> </html>
