snippet: view plain - save this
1 function rightClick() {
2 var oLinksConversationObj = [
3 { name: 'Close',
4 callback:function(){
5 closeConversationDialog();
6 }
7 }
8 ]
9 conversationRightClickObj = new Proto.Menu({
10 selector:'.conversationTop',
11 id: 'conversationRc',
12 className: 'menu firefox',
13 fade: true,
14 zIndex: 3000,
15 menuItems: oLinksConversationObj
16 });
17
18 for (var i=0;i<outputContactListObj.length;i++){
19 for (var j = 0; j < (outputContactListObj[i].contactsList.length != 0? outputContactListObj[i].contactsList.length:1); j++) {
20 if (outputContactListObj[i].contactsList[j].wcapUser.isBlocked){
21 var oLinksContactObj = [
22 { name: 'Send Message',
23 callback: function(xh){
24 onBuddyDblClick();
25 }
26 },
27 { name: 'View Contact Info',
28 callback: function(xh){
29 viewContactInfoActual(fullAddress);
30 }
31 },
32 {separator: true},
33 { name: 'Delete Contact',
34 callback: function(xh){
35 deleteContact();
36 }
37 },
38 { name: 'Unblock Contact',
39 callback: function(xh){
40 unBlockContact(fullAddress);
41 }
42 }
43 ]
44 contactRightClickObj = new Proto.Menu({
45 selector: '.contextMenuContacts',
46 id: 'contactRc',
47 className: 'menu firefox',
48 fade: true,
49 zIndex: 3000,
50 menuItems: oLinksContactObj
51 });
52 } else {
53 var oLinksContactObj = [
54 { name: 'Send Message',
55 callback: function(xh){
56 onBuddyDblClick();
57 }
58 },
59 { name: 'View Contact Info',
60 callback: function(){
61 viewContactInfoActual(fullAddress);
62 }
63 },
64 {separator: true},
65 { name: 'Delete Contact',
66 callback: function(xh){
67 deleteContact();
68 }
69 },
70 { name: 'Block Contact',
71 callback: function(xh){
72 blockContact(fullAddress);
73 }
74 }
75 ]
76 contactRightClickObj = new Proto.Menu({
77 selector: '.contextMenuContacts',
78 id: 'contactRc',
79 className: 'menu firefox',
80 fade: true,
81 zIndex: 3000,
82 menuItems: oLinksContactObj
83 });
84 }
85 }
86 }
87
88
89
90 var oLinksContactListObj = [
91 { name: 'Shout',
92 callback: function(xh){
93 shoutWindow(curContactList); /*dcj:snippeted changed shoutWindow() => shoutWindow(curContactList)*/
94 },
95 disabled: false
96 },
97 { name: 'Add Contacts',
98 callback: function(xh){
99 new_buddy_dialog();
100 }
101 },
102 {
103 name: 'Add Contact List',
104 callback: function(xh){
105 add_contactlist();
106 }
107 },
108 {
109 name: 'Edit Contact List',
110 callback: function(xh){
111 editContactList();
112 action = 'editContactList';
113 }
114 },
115 {
116 name: 'Delete Contact List',
117 callback: function(xh){
118 deleteContactList();
119 action = 'deleteContactList';
120 }
121 }
122 ]
123
124 contactListRightClickObj = new Proto.Menu({
125 selector: '.groupTop',
126 id: 'contactListRc',
127 className: 'menu firefox',
128 fade: true,
129 zIndex: 3001,
130 menuItems: oLinksContactListObj
131 });
132 }

0 comments