From 0d3b2f03a197cdedd78505b0a798fd1c4ec687d0 Mon Sep 17 00:00:00 2001 From: hamza zia Date: Mon, 25 Feb 2013 14:09:11 +0100 Subject: [PATCH] added manage menu to angular --- angular.html | 68 ++++++++++++++++++++++++++++++-------------- js/ctrls/download.js | 3 -- js/ctrls/nav.js | 14 +++++++++ 3 files changed, 60 insertions(+), 25 deletions(-) diff --git a/angular.html b/angular.html index 5f450cc..45cd163 100644 --- a/angular.html +++ b/angular.html @@ -112,15 +112,32 @@ - @@ -128,29 +145,36 @@ diff --git a/js/ctrls/download.js b/js/ctrls/download.js index 011a730..a3dceff 100644 --- a/js/ctrls/download.js +++ b/js/ctrls/download.js @@ -157,8 +157,6 @@ function( rpc.once('getOption', [d.gid], function(data) { var vals = data[0]; - window.fs = fsettings; - window.ai = activeInclude; for (var i in fsettings) { if (type == 'active' && activeInclude.indexOf(i) == -1) continue; @@ -167,7 +165,6 @@ function( settings[i] = fsettings[i]; settings[i].val = vals[i] || settings[i].val; } - console.log(type); modals.invoke('settings', settings, scope.getName(d) + ' settings', function(settings) { var sets = {}; diff --git a/js/ctrls/nav.js b/js/ctrls/nav.js index 483c641..9a3ecf4 100644 --- a/js/ctrls/nav.js +++ b/js/ctrls/nav.js @@ -14,11 +14,25 @@ angular gsettings, gexclude ) { + // app name scope.name = name; // initially collapsed in mobile resolution scope.collapsed = true; + // manage download functions + scope.forcePauseAll = function() { + rpc.once('forcePauseAll', []); + } + + scope.purgeDownloadResult = function() { + rpc.once('purgeDownloadResult', []); + } + + scope.unpauseAll = function() { + rpc.once('unpauseAll', []); + } + scope.addUris = function() { modals.invoke( 'getUris', _.bind(rhelpers.addUris, rhelpers)