+
+ $('#event-share-checkbox').change(function() {
+
+ if ($('#event-share-checkbox').is(':checked')) {
+ $('#acl-wrapper').show();
+ }
+ else {
+ $('#acl-wrapper').hide();
+ }
+ }).trigger('change');
+
+
+ $(".popupbox").click(function () {
+ var parent = $( $(this).attr('href') ).parent();
+ if (parent.css('display') == 'none') {
+ parent.show();
+ } else {
+ parent.hide();
+ }
+ return false;
+ });
+
+
+
+ if(typeof window.AjaxUpload != "undefined") {
+ var uploader = new window.AjaxUpload(
+ window.imageUploadButton,
+ { action: 'wall_upload/'+window.nickname+'?nomce=1',
+ name: 'userfile',
+ onSubmit: function(file,ext) { $('#profile-rotator').show(); },
+ onComplete: function(file,response) {
+ addeditortext(window.jotId, response);
+ $('#profile-rotator').hide();
+ }
+ }
+ );
+
+ if($('#wall-file-upload').length) {
+ var file_uploader = new window.AjaxUpload(
+ 'wall-file-upload',
+ { action: 'wall_attach/'+window.nickname+'?nomce=1',
+ name: 'userfile',
+ onSubmit: function(file,ext) { $('#profile-rotator').show(); },
+ onComplete: function(file,response) {
+ addeditortext(window.jotId, response);
+ $('#profile-rotator').hide();
+ }
+ }
+ );
+ }
+ }
+
+
+ if(typeof window.aclInit !="undefined" && typeof acl=="undefined"){
+ acl = new ACL(
+ baseurl+"/acl",
+ [ window.allowCID,window.allowGID,window.denyCID,window.denyGID ]
+ );
+ }
+
+ switch(window.autocompleteType) {
+ case 'msg-header':
+ $("#recip").name_autocomplete(baseurl + '/acl', '', false, function(data) {
+ $("#recip-complete").val(data.id);
+ });
+ break;
+ case 'contacts-head':
+ $("#contacts-search").contact_autocomplete(baseurl + '/acl', 'a', true);
+
+
+ $("#contacts-search").keyup(function(event){
+ if(event.keyCode == 13){
+ $("#contacts-search").click();
+ }
+ });
+ $(".autocomplete-w1 .selected").keyup(function(event){
+ if(event.keyCode == 13){
+ $("#contacts-search").click();
+ }
+ });
+ break;
+ case 'display-head':
+ $(".comment-wwedit-wrapper textarea").editor_autocomplete(baseurl+"/acl");
+ break;
+ default:
+ break;
+ }
+
+
+/* if(window.autoCompleteType == "display-head") {
+ //$(".comment-edit-wrapper textarea").contact_autocomplete(baseurl+"/acl");