FogBugz » TimeIntervalCommentsPlugin http://fogbugz.stackexchange.com/questions/3316
Clone URL:  
Pushed to one repository · View In Graph Contained in version_0-2-0-0, version_0-2-0-1, and tip

...

Changeset f77da6f85980

Parent f320564a9131

by Adam Wishneusky

Changes to 2 files · Browse files at f77da6f85980 Showing diff from parent f320564a9131 Diff from another changeset...

 
39
40
41
42
43
 
 
 
39
40
41
 
 
42
43
@@ -39,5 +39,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers  // by using the '*' as shown below:  // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.1.0")] -[assembly: AssemblyFileVersion("0.1.1.0")] +[assembly: AssemblyVersion("0.1.1.2")] +[assembly: AssemblyFileVersion("0.1.1.2")]
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
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
 var TimeIntervalExamplePlugin = new function(){   var oSelf = this;     this.doPopup = function(elPopupAnchor)   {   oSelf.Popup.setHtml(   '<form id="TimeIntervalExamplePluginForm" onsubmit="TimeIntervalExamplePlugin.Popup.hide(); postTimeIntervalComment(); return false;">\n' +   '<h1><label for="comment">Comment:</label></h1>' +   '<div>' + - '<input type="hidden" name="ixInterval" value="-1">' + + '<input type="hidden" name="ixInterval">' +   '<input type="text" id="comment" name="comment">' +   '</div>' +   '<br /><nobr><input type="submit" value="' + FB_OK + '" class="dlgButton"> ' +   '<input type="button" onclick="TimeIntervalExamplePlugin.Popup.hide(); return false;" value="' + FB_CANCEL+ '" class="dlgButton"></nobr>' +   '</form>' +   '<script type="text/javascript">' + - + 'alert("foo");' +   '$("form#TimeIntervalExamplePluginForm input[name=ixInterval]").val("' + elPopupAnchor.attributes.getNamedItem("ixInterval").value + '");' +   'getTimeIntervalComment(' + elPopupAnchor.attributes.getNamedItem("ixInterval").value + ');' +   '</script>');   oSelf.Popup.showPopup(elPopupAnchor);   return false;   }     $(document).ready(function(){   oSelf.Popup = api.PopupManager.newPopup("TimeIntervalExamplePlugin");   });  }();    function doTimesheetMagic(){   // put your jQuery magic here that manipulates the timesheet table   // keep in mind that this code will be called each time the timesheet dialog is displayed   var i = 0;   jQuery("#idTimesheetTable tbody tr").each( function(index)   {   var thisId = $(this).attr("id");   if (i == 0)   {   $(this).append("<th>&nbsp;</th>");   }   else if (i > 0)   {   if (thisId.length > 0)   {   var ixInterval = thisId.substring(thisId.indexOf("_") + 1);   $(this).append('<td><a href="#" ixInterval="' + ixInterval + '" onclick="TimeIntervalExamplePlugin.doPopup(this); return false;">' + ixInterval + '</a></td>');   }   else   {   $(this).append("<th>&nbsp;</th>");   i = -2;   }   }   i++;   });  }  var nWaitCount = 0;  function waitForTimesheetReady(){   console.log('lookin for timesheet table...');   if($('#idTimesheetTable').length === 0 && nWaitCount < 10){   console.log('not found, so wait a bit');   nWaitCount++;   setTimeout(waitForTimesheetReady, 200);   }else{   console.log('found it! now do stuff...');   doTimesheetMagic();   }  }  var oldShow = ClockPopup.show;  ClockPopup.show = function(){   console.log('Calling ClockPopup.show()...');   var result = oldShow.apply(ClockPopup, arguments);   nWaitCount = 0;   waitForTimesheetReady();   return result;  };    function myCallback(sHTML, status)  {   alert(sHTML);  }