1function createGrayBox(link_element, width, height){ 2 SqueezeBox.open(link_element, { 3 handler: 'iframe', 4 size: {x: width, y: height} 5 }); 6} 7 8function countHitsClicks(media_id){ 9 10 var req = new Request.HTML({ 11 12 method: 'get', 13 14 url: 'components/com_publisher/js/ajax.php?task=countClicks&media_id='+media_id, 15 16 data: { 'do' : '1' }, 17 18 update: $('media_hits'), 19 20 onComplete: function(response){ 21 22 } 23 24 }).send(); 25 26} 27 28 29 30function generateCode(){ 31 32 var req = new Request.HTML({ 33 34 method: 'get', 35 36 url: 'components/com_publisher/js/ajax.php?task=generateCode', 37 38 data: { 'do' : '1' }, 39 40 update: $('generateCode'), 41 42 onComplete: function(response){ 43 44 } 45 46 }).send(); 47 48} 49 50 51 52function on_over_size(id){ 53 54 document.getElementById(id).style.background = '#D8E6FB'; 55 56} 57 58 59 60function MM_openBrWindow(theURL,winName,features) { 61 62 window.open(theURL,winName,features); 63 64 return true; 65 66} 67 68 69 70function mediaPublished(published, id){ 71 72 document.getElementById("cb"+id).checked = true; 73 74 if(published == 1){ 75 76 document.adminForm.task.value="declined"; 77 78 } 79 80 else if(published == 2){ 81 82 document.adminForm.task.value="approved"; 83 84 } 85 86 else if(published == 3){ 87 88 document.adminForm.task.value="pending"; 89 90 } 91 92 document.adminForm.submit(); 93 94} 95 96 97 98function addFileLoader(){ 99 100 var nr = document.adminForm.nr_files.value; 101 102 document.adminForm.nr_files.value = parseInt(nr) + 1; 103 104 var divfile = document.adminForm.getElementById("loadfile"); 105 106 var input = document.createElement('input'); 107 108 input.type = 'file'; 109 110 input.size = '30'; 111 112 input.name = 'attachments[]'; 113 114 input.id= "files"+(parseInt(nr)+1); 115 116 divfile.appendChild(document.createElement('br')); 117 118 divfile.appendChild(input); 119 120} 121 122/************* end images*/ 123 124 125 126function articleSelectMedia(media_id, media_name){ 127 128 var article_id = window.parent.document.getElementById('id').value; 129 130 //window.parent.document.getElementById('id_name').value = parseInt(media_id); 131 132 var req = new Request.HTML({ 133 134 method: 'get', 135 136 url: 'components/com_publisher/js/ajax.php?task=addArticleMedia&media_id='+media_id+'&media_name='+media_name+'&article_id='+article_id, 137 138 data: { 'do' : '1' }, 139 140 update: window.parent.document.getElementById("media_items"), 141 142 onComplete: function(response){ 143 144 window.parent.SqueezeBox.close(); 145 146 } 147 148 }).send(); 149 150} 151 152function deleteArticleMedia2(med_id, art_id){ 153 154 node = document.getElementById("row_"+med_id); 155 node.parentNode.removeChild(node); 156} 157 158function deleteArticleMedia(med_id, art_id){ 159 160 all_media_value_in_hidden = document.adminForm.media.value; 161 162 var req = new Request.HTML({ 163 164 method: 'get', 165 166 url: 'components/com_publisher/js/ajax.php?task=deleteArticleMedia&media_id='+med_id+'&article_id='+art_id+'&all_media_value_in_hidden='+all_media_value_in_hidden, 167 168 data: { 'do' : '1' }, 169 170 update: $("media_items"), 171 172 onComplete: function(response){ 173 174 //window.parent.SqueezeBox.close(); 175 176 } 177 178 }).send(); 179 180 181 182 media_hidden = document.adminForm.media.value; 183 184 media_hidden_array = media_hidden.split(","); 185 186 new_value = ""; 187 188 for(i=0; i<media_hidden_array.length; i++){ 189 190 if(media_hidden_array[i] != "" && media_hidden_array[i] != med_id){ 191 192 new_value += media_hidden_array[i]+","; 193 194 } 195 196 } 197 198 document.adminForm.media.value = new_value; 199 200} 201 202/*function saveLocationMedia(med_id, location){ 203 204 var req = new Request.HTML({ 205 206 method: 'get', 207 208 url: 'components/com_publisher/js/ajax.php?task=saveLocationMedia&media_id='+med_id+'&location='+location, 209 210 data: { 'do' : '1' }, 211 212 onComplete: function(response){ 213 214 } 215 216 }).send(); 217 218}*/ 219 220function countTitle(obj, no, i, type, maxNum){ 221 222 if(type == "Words"){ 223 224 var myArray = no.split(' '); 225 226 var numar = maxNum - myArray.length; 227 228 } 229 230 else 231 232 var numar = maxNum - no.length; 233 234 document.getElementById("go_"+i).innerHTML = numar; 235 236 if(numar < 0) 237 238 changeColor(i, 'go', 'red') 239 240 else changeColor(i, 'go', '#666666') 241 242 var par = obj.parentNode.parentNode.parentNode.parentNode; 243 244 if(numar != maxNum) { 245 246 par.style.backgroundColor='transparent'; 247 248 } 249 250 else par.style.backgroundColor='#ffffcc'; 251 252} 253 254 255 256function changeColor(id, spanId, color){ 257 258 document.getElementById(spanId+"_"+id).style.color = color; 259 260} 261 262 263 264/*function countEditorMaxWords(max_nr, edito_id, div_id){ 265 266 alert(max_nr+"--"+edito_id+"--"+div_id); 267 268}*/ 269 270 271 272/*function uploadIssuePhoto(){ 273 274 photo = (document.getElementById('issuephoto').value).toLowerCase(); 275 276 277 278 var fileControl = document.adminForm.issuephoto; 279 280 alert(fileControl.value); 281 282 var thisext = fileControl.value.substr(fileControl.value.lastIndexOf('.')); 283 284 if(thisext != ".jpeg" && thisext != ".jpg" && thisext != ".gif" && thisext != ".png" && thisext != ".JPEG" && thisext != ".JPG" && thisext != ".GIF" && thisext != ".PNG"){ 285 286 alert(' The extension must be .jpg, .gif or .png! '); 287 288 return false;
289 290 } 291 292 else{ 293 294 var req = new Request.HTML({ 295 296 method: 'get', 297 298 url: 'components/com_publisher/js/ajax.php?task=previewIssuePhoto&photo='+photo, 299 300 data: { 'do' : '1' }, 301 302 update: $('previewIssuePhoto'), 303 304 onComplete: function(response){ 305 306 } 307 308 }).send(); 309 310 } 311 312}*/ 313 314function includeCategoryQueez(nr){ 315 316 var c_value = ""; 317 318 var list = "<ul>"; 319 320 for(var i=0; i<nr; i++){ 321 322 if(document.getElementById('list'+i).checked){ 323 324 value = document.getElementById('list'+i).value; 325 326 value_array = new Array(); 327 328 value_array = value.split("|"); 329 330 c_value = c_value + value_array[0] + ","; 331 332 list += "<li id=\"joomla_cat_id_"+value_array[0]+"\">"+value_array[1]+" <a href=\"#\" onclick=\"removeJoomlaCategory("+value_array[0]+"); return false;\" class=\"delete_category\"> </a></li>"; 333 334 } 335 336 } 337 338 list += "</ul>"; 339 340 window.parent.document.adminForm.joomla_categories.value = c_value; 341 342 window.parent.document.getElementById("core_joomla_categories").innerHTML = list; 343 344 window.parent.SqueezeBox.close(); 345 346} 347 348 349 350function removeJoomlaCategory(id){ 351 352 var elem = document.getElementById('joomla_cat_id_'+id); 353 354 elem.parentNode.removeChild(elem); 355 356 357 358 categs = document.adminForm.joomla_categories.value; 359 360 categs_array = new Array(); 361 362 categs_array = categs.split(","); 363 364 new_value = ""; 365 366 for(var i=0; i<categs_array.length; i++){ 367 368 if((categs_array[i] != "") && (categs_array[i] != id)){ 369 370 new_value += categs_array[i]+","; 371 372 } 373 374 } 375 376 document.adminForm.joomla_categories.value = new_value; 377 378 return false; 379 380} 381 382 383 384function cancelCategoryQueez(){ 385 386 document.adminForm.task.value="cancel"; 387 388 document.adminForm.submit(); 389 390} 391 392 393 394function countPublisherWords(min_words, max_words){ 395 w = document.adminForm.content; 396 var y = w.value; 397 var current = 0; 398 a = y.replace(/\s/g,' '); 399 a = a.split(' '); 400 401 for(z=0; z<a.length; z++){ 402 if(a[z].length > 0){ 403 current++; 404 } 405 } 406 407 document.getElementById("current_words").innerHTML = current; 408 difference = min_words - current; 409 410 if(difference > 0 && difference < min_words){ 411 document.getElementById("text-alert").className = "red-class"; 412 document.getElementById("difference_words").innerHTML = difference; 413 document.getElementById("first_text").innerHTML = "minimum word count is"; 414 document.getElementById("separator").innerHTML = ","; 415 document.getElementById("second_text").innerHTML = "please enter at least"; 416 document.getElementById("words-morewords").innerHTML = "more words"; 417 document.getElementById("difference_words").innerHTML = difference; 418 } 419 else if(difference <= 0 && (current <= max_words)){ 420 document.getElementById("text-alert").className = "green-class"; 421 document.getElementById("first_text").innerHTML = "we accept articles between"; 422 document.getElementById("separator").innerHTML = " and"; 423 document.getElementById("second_text").innerHTML = ""; 424 document.getElementById("difference_words").innerHTML = max_words; 425 document.getElementById("min_words").innerHTML = min_words; 426 document.getElementById("words-morewords").innerHTML = "words"; 427 } 428 else if(current > max_words){ 429 document.getElementById("text-alert").className = "red-class"; 430 document.getElementById("first_text").innerHTML = "maximum word count is"; 431 document.getElementById("separator").innerHTML = ","; 432 document.getElementById("second_text").innerHTML = "please remove at least"; 433 document.getElementById("min_words").innerHTML = max_words; 434 document.getElementById("difference_words").innerHTML = (current - max_words); 435 } 436} 437 438jQuery(window).load(function(){ 439 //alert('a'); 440 jQuery('.image_class_for_resize').each(function(i){ 441 var id_div = jQuery(this).attr('id'); 442 var photo_width = jQuery('#'+id_div+' img').width(); 443 jQuery('#'+id_div+' span').width(photo_width); 444 jQuery('#'+id_div+' span object').width(photo_width); 445 jQuery('#'+id_div+' .media_title').width(photo_width); 446 jQuery('#'+id_div+' .media_attributes').width(photo_width); 447 //var photo_width=jQuery().width(); 448 //jQuery(this).next().width(photo_width); 449 }); 450});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.