From 401b1b3d895d52158714704b566b9e0b759e14fb Mon Sep 17 00:00:00 2001 From: David Baldwynn Date: Mon, 11 Apr 2016 23:02:51 -0400 Subject: [PATCH] added enter to scroll --- bower.json | 3 ++- public/config.js | 4 ++-- .../forms/directives/submit-form.client.directive.js | 11 ++++++----- .../directiveViews/form/submit-form.client.view.html | 7 ++++++- public/populate_template_cache.js | 2 +- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/bower.json b/bower.json index 0adbc699..ddd75a01 100755 --- a/bower.json +++ b/bower.json @@ -31,7 +31,8 @@ "file-saver.js": "~1.20150507.2", "angular-bootstrap-colorpicker": "~3.0.19", "components-font-awesome": "~4.4.0", - "angular-ui-router-tabs": "~1.7.0" + "angular-ui-router-tabs": "~1.7.0", + "angular-scroll": "^1.0.0" }, "resolutions": { "angular-bootstrap": "^0.14.0", diff --git a/public/config.js b/public/config.js index d2c6e07e..ecfe44ad 100755 --- a/public/config.js +++ b/public/config.js @@ -4,7 +4,7 @@ var ApplicationConfiguration = (function() { // Init module configuration options var applicationModuleName = 'NodeForm'; - var applicationModuleVendorDependencies = ['ngResource', 'NodeForm.templates', 'ngAnimate', 'ui.router', 'ui.bootstrap', 'ui.utils', 'ngRaven', 'cgBusy']; + var applicationModuleVendorDependencies = ['duScroll', 'ngResource', 'NodeForm.templates', 'ngAnimate', 'ui.router', 'ui.bootstrap', 'ui.utils', 'ngRaven', 'cgBusy']; // Add a new vertical module var registerModule = function(moduleName, dependencies) { @@ -20,4 +20,4 @@ var ApplicationConfiguration = (function() { applicationModuleVendorDependencies: applicationModuleVendorDependencies, registerModule: registerModule }; -})(); \ No newline at end of file +})(); diff --git a/public/modules/forms/directives/submit-form.client.directive.js b/public/modules/forms/directives/submit-form.client.directive.js index 5d545efc..54708536 100644 --- a/public/modules/forms/directives/submit-form.client.directive.js +++ b/public/modules/forms/directives/submit-form.client.directive.js @@ -8,7 +8,7 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter' scope: { myform:'=' }, - controller: function($scope){ + controller: function($document, $scope){ $scope.authentication = $rootScope.authentication; $scope.reloadForm = function(){ @@ -28,7 +28,7 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter' //Reset Timer TimeCounter.restartClock(); }; - + /* ** Field Controls */ @@ -50,9 +50,10 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter' }; $rootScope.nextField = $scope.nextField = function(){ - console.log($scope.selected.index) - console.log($scope.myform.form_fields.length-1); - if($scope.selected.index < $scope.myform.form_fields.length-1){ + //console.log($scope.selected.index) + //console.log($scope.myform.form_fields.length-1); + + if($scope.selected.index < $scope.myform.form_fields.length-1){ $scope.selected.index++; $scope.selected._id = $scope.myform.form_fields[$scope.selected.index]._id; $rootScope.setActiveField($scope.selected._id, $scope.selected.index); diff --git a/public/modules/forms/views/directiveViews/form/submit-form.client.view.html b/public/modules/forms/views/directiveViews/form/submit-form.client.view.html index 5f77434a..0541a8f9 100755 --- a/public/modules/forms/views/directiveViews/form/submit-form.client.view.html +++ b/public/modules/forms/views/directiveViews/form/submit-form.client.view.html @@ -43,7 +43,12 @@
-
+
diff --git a/public/populate_template_cache.js b/public/populate_template_cache.js index dd1809d4..e3f8531f 100644 --- a/public/populate_template_cache.js +++ b/public/populate_template_cache.js @@ -294,7 +294,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa $templateCache.put("../public/modules/forms/views/directiveViews/form/edit-submissions-form.client.view.html", "
#{{value.title}}OscarEMR User ProfilePercentage CompleteTime ElapsedDeviceLocationIP AddressDate Submitted (UTC)Generated PDF
{{$index+1}}{{field.fieldValue}}User Profile #{{row.oscarDemoNum}}{{row.percentageComplete}}%{{row.timeElapsed}}{{row.device.name}}, {{row.device.type}}{{row.geoLocation.city}}, {{row.geoLocation.country}}{{row.ipAddr}}{{row.created | date:'yyyy-MM-dd HH:mm:ss'}}Generated PDF
"); $templateCache.put("../public/modules/forms/views/directiveViews/form/submit-form.client.view.html", - "
press ENTER

{{myform | formValidity}} out of {{myform.visible_form_fields.length}} answered

"); + "
press ENTER

{{myform | formValidity}} out of {{myform.visible_form_fields.length}} answered

"); $templateCache.put("../public/modules/users/views/authentication/access-denied.client.view.html", "

You need to be logged in to access this page

Login
"); $templateCache.put("../public/modules/users/views/authentication/signin.client.view.html",