Changeset 9523
- Timestamp:
- Nov 14, 2009, 2:57:47 PM (13 years ago)
- Location:
- trunk/web/javascript
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/javascript/common.js
r9507 r9523 287 287 288 288 Prefs._RefreshRate = 'refresh_rate'; 289 Prefs._SessionRefreshRate = 'session_refresh_rate'; 289 290 290 291 Prefs._ShowFilter = 'show_filter'; -
trunk/web/javascript/transmission.js
r9510 r9523 122 122 123 123 this.togglePeriodicRefresh( true ); 124 this.togglePeriodicSessionRefresh( true ); 124 125 }, 125 126 … … 740 741 741 742 /* 742 * Turn the periodic ajax -refresh on & off743 * Turn the periodic ajax torrents refresh on & off 743 744 */ 744 745 togglePeriodicRefresh: function(state) { … … 756 757 }, 757 758 759 /* 760 * Turn the periodic ajax session refresh on & off 761 */ 762 togglePeriodicSessionRefresh: function(state) { 763 var tr = this; 764 if (state && this._periodic_session_refresh == null) { 765 // sanity check 766 if( !this[Prefs._SessionRefreshRate] ) 767 this[Prefs._SessionRefreshRate] = 5; 768 remote = this.remote; 769 this._periodic_session_refresh = setInterval( 770 function(){ tr.loadDaemonPrefs(); }, this[Prefs._SessionRefreshRate] * 1000 771 ); 772 } else { 773 clearInterval(this._periodic_session_refresh); 774 this._periodic_session_refresh = null; 775 } 776 }, 777 758 778 toggleTurtleClicked: function() { 759 779 // Toggle the value … … 788 808 setTimeout("$('div#prefs_container div.dialog_window').css('top', '0px');",10); 789 809 this.updateButtonStates( ); 810 this.togglePeriodicSessionRefresh(false); 790 811 }, 791 812 … … 803 824 } 804 825 this.updateButtonStates( ); 826 this.togglePeriodicSessionRefresh(true); 805 827 }, 806 828 -
trunk/web/javascript/transmission.remote.js
r9507 r9523 74 74 'Dismiss'); 75 75 remote._controller.togglePeriodicRefresh(false); 76 remote._controller.togglePeriodicSessionRefresh(false); 76 77 }, 77 78
Note: See TracChangeset
for help on using the changeset viewer.