2 <script language="javascript" type="text/javascript" src="$baseurl/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
3 <script language="javascript" type="text/javascript">
7 mode : "specific_textareas",
8 editor_selector: /(profile-jot-text|prvmail-text)/,
10 theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect",
11 theme_advanced_buttons2 : "",
12 theme_advanced_buttons3 : "",
13 theme_advanced_toolbar_location : "top",
14 theme_advanced_toolbar_align : "center",
15 theme_advanced_blockformats : "blockquote,code",
16 entity_encoding : "raw",
17 add_unload_trigger : false,
18 remove_linebreaks : false,
19 force_p_newlines : false,
20 force_br_newlines : true,
21 forced_root_block : '',
23 content_css: "$baseurl/view/custom_tinymce.css",
25 theme_advanced_path : false,
26 setup : function(ed) {
27 ed.onKeyUp.add(function(ed, e) {
28 var txt = tinyMCE.activeEditor.getContent();
29 var text = txt.length;
30 if(txt.length <= 140) {
31 $('#character-counter').removeClass('red');
32 $('#character-counter').removeClass('orange');
33 $('#character-counter').addClass('grey');
35 if((txt.length > 140) && (txt .length <= 420)) {
36 $('#character-counter').removeClass('grey');
37 $('#character-counter').removeClass('red');
38 $('#character-counter').addClass('orange');
40 if(txt.length > 420) {
41 $('#character-counter').removeClass('grey');
42 $('#character-counter').removeClass('orange');
43 $('#character-counter').addClass('red');
45 $('#character-counter').text(text);
51 <script type="text/javascript" src="include/ajaxupload.js" ></script>
53 $(document).ready(function() {
54 var uploader = new window.AjaxUpload(
56 { action: 'wall_upload/$nickname',
58 onSubmit: function(file,ext) { $('#profile-rotator').show(); },
59 onComplete: function(file,response) {
60 tinyMCE.execCommand('mceInsertRawHTML',false,response);
61 $('#profile-rotator').hide();
65 $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
67 $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
68 selstr = $(this).text();
69 $('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
73 $('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
79 function jotGetLink() {
80 reply = prompt("Please enter a link URL:");
81 if(reply && reply.length) {
82 $('#profile-rotator').show();
83 $.get('parse_url?url=' + reply, function(data) {
84 tinyMCE.execCommand('mceInsertRawHTML',false,data);
85 $('#profile-rotator').hide();
90 function jotGetVideo() {
91 reply = prompt("Please enter a YouTube link:");
92 if(reply && reply.length) {
93 tinyMCE.execCommand('mceInsertRawHTML',false,'[youtube]' + reply + '[/youtube]');
97 function jotGetLocation() {
98 reply = prompt("Where are you right now?", $('#jot-location').val());
99 if(reply && reply.length) {
100 $('#jot-location').val(reply);
105 function linkdropper(event) {
106 var linkFound = event.dataTransfer.types.contains("text/uri-list");
108 event.preventDefault();
111 function linkdrop(event) {
112 var reply = event.dataTransfer.getData("text/uri-list");
113 event.target.textContent = reply;
114 event.preventDefault();
115 if(reply && reply.length) {
116 $('#profile-rotator').show();
117 $.get('parse_url?url=' + reply, function(data) {
118 tinyMCE.execCommand('mceInsertRawHTML',false,data);
119 $('#profile-rotator').hide();
124 function jotClearLocation() {
125 $('#jot-coord').val('');
126 $('#profile-nolocation-wrapper').hide();