diff --git a/Gruntfile.js b/Gruntfile.js index 761c021..d8d8000 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,7 +14,16 @@ module.exports = function(grunt) { jpm: { options: { src: "./firefox/", - xpi: "./tmp/" + xpi: "./tmp/gte38/" + } + }, + "mozilla-cfx-xpi": { + 'stable': { + options: { + "mozilla-addon-sdk": "latest", + extension_dir: "firefox", + dist_dir: "tmp/lte37/" + } } }, copy: { @@ -23,6 +32,7 @@ module.exports = function(grunt) { // includes files within path {expand: true, src: ['js/*'], dest: 'firefox/data/', filter: 'isFile'}, {expand: true, src: ['css/*'], dest: 'firefox/data/', filter: 'isFile'}, + {expand: true, src: ['bower_components/bootstrap/dist/fonts/*'], dest: 'firefox/data/', filter: 'isFile'}, {src: 'options.html', dest: 'firefox/data/options.html'}, {src: 'package.json', dest: 'firefox/package.json'}, {expand: true, src: ['partial_*.html'], dest: 'firefox/data/', filter: 'isFile'}, @@ -71,17 +81,20 @@ module.exports = function(grunt) { }, curl: { 'firefox/data/bower_components/jquery/dist/jquery.min.js': 'http://code.jquery.com/jquery-2.1.3.min.js', + 'firefox/data/bower_components/angular/angular.min.js': 'https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js', + 'firefox/data/bower_components/angular-route/angular-route.min.js': 'https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-route.min.js', } }); grunt.loadNpmTasks('grunt-contrib-compress'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-jpm'); + grunt.loadNpmTasks('grunt-mozilla-addon-sdk'); grunt.loadNpmTasks('grunt-curl'); // Default task(s). grunt.registerTask('default', ['compress']); grunt.registerTask('test-firefox', ['copy','jpm:run']); - grunt.registerTask('build-firefox', ['copy','curl','jpm:xpi']); + grunt.registerTask('build-firefox', ['copy','curl','jpm:xpi','mozilla-cfx-xpi:stable']); grunt.registerTask('build-chrome', ['compress:main']); }; \ No newline at end of file diff --git a/js/options.js b/js/options.js index fcc690a..e8264f1 100644 --- a/js/options.js +++ b/js/options.js @@ -43,13 +43,12 @@ optionsApp.controller('ProtectedController', ['StorageService', '$scope', functi $scope.should.refreshTable = false; StorageService.getSync("protectedUsers",function(items) { - var dataset=[]; + $scope.protectedUsers=[]; for(var username in items.protectedUsers) { - var receipt = items.protectedUsers[username]; - dataset.push( receipt ); + $scope.protectedUsers.push(items.protectedUsers[username]); } - $scope.protectedUsers = dataset; $scope.should.refreshTable = true; + $scope.$apply(); }); $scope.deleteProtection = function(user) { var response = confirm("Are you sure you want to remove "+user.username+" from the protected users list?"); diff --git a/package.json b/package.json index 8b596a0..c318935 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "grunt-contrib-compress": "^0.13.0", "grunt-contrib-copy": "^0.8.0", "grunt-jpm": "^0.1.0", - "grunt-curl": "~2.2.0" + "grunt-curl": "~2.2.0", + "grunt-mozilla-addon-sdk": "^0.4.0" } } diff --git a/partial_protects.html b/partial_protects.html index 81642d1..7441bcc 100644 --- a/partial_protects.html +++ b/partial_protects.html @@ -8,7 +8,7 @@ - + {{ user.username }} {{ user.on | date:'medium' }} Delete