diff --git a/= b/= deleted file mode 100644 index 845f7c5a..00000000 --- a/= +++ /dev/null @@ -1,7 +0,0 @@ -Merge branch 'stage' of https://github.com/whitef0x0/tellform into stage - -# Please enter a commit message to explain why this merge is necessary, -# especially if it merges an updated upstream into a topic branch. -# -# Lines starting with '#' will be ignored, and an empty message aborts -# the commit. diff --git a/app/controllers/core.server.controller.js b/app/controllers/core.server.controller.js index 1ad1306c..e30c1a23 100755 --- a/app/controllers/core.server.controller.js +++ b/app/controllers/core.server.controller.js @@ -13,8 +13,8 @@ exports.index = function(req, res) { }; exports.form = function(req, res) { - //Allow form to be embeded - res.removeHeader('X-Frame-Options'); + //Allow form to be embedded + res.set('X-Frame-Options', 'GOFORIT'); res.render('form', { user: req.user || null, diff --git a/public/modules/core/controllers/header.client.controller.js b/public/modules/core/controllers/header.client.controller.js index e3aa98b0..7f2b124c 100755 --- a/public/modules/core/controllers/header.client.controller.js +++ b/public/modules/core/controllers/header.client.controller.js @@ -6,11 +6,12 @@ angular.module('core').controller('HeaderController', ['$rootScope', '$scope', ' $rootScope.signupDisabled = $window.signupDisabled; $scope.user = $rootScope.user = Auth.ensureHasCurrentUser(User); + + console.log(Auth.ensureHasCurrentUser(User)); $scope.authentication = $rootScope.authentication = Auth; $rootScope.languages = $scope.languages = ['en', 'fr', 'es', 'it', 'de']; - console.log($locale.id); //Set global app language if($scope.authentication.isAuthenticated()){ $rootScope.language = $scope.user.language; diff --git a/public/modules/core/css/core.css b/public/modules/core/css/core.css index 9bbb32a1..ead2fdff 100755 --- a/public/modules/core/css/core.css +++ b/public/modules/core/css/core.css @@ -10,6 +10,27 @@ body { float: none; } +/* Custom CSS for Buttons */ +.btn-rounded { + border-radius: 100px; + font-size: 14px; + padding: 10px 28px; + margin: 0 2px; + margin-top: 1em; + text-transform: uppercase; + text-decoration: none!important; +} + +.btn-secondary { + background: #DDDDDD; + color: #4c4c4c; + border: 2px #4c4c4c solid; +} +.btn-secondary:hover { + background: #cacaca; + border-color: #cacaca; +} + /*Navbar Custom CSS*/ .navbar { min-height: 60px; @@ -33,6 +54,7 @@ body { min-height: 60px; } .navbar-nav > li > a { + padding-top: 20px; color: white; } .navbar-nav > li:hover, .navbar-nav > li.active { diff --git a/public/modules/forms/admin/controllers/admin-form.client.controller.js b/public/modules/forms/admin/controllers/admin-form.client.controller.js index 35877d5f..3d1713bb 100644 --- a/public/modules/forms/admin/controllers/admin-form.client.controller.js +++ b/public/modules/forms/admin/controllers/admin-form.client.controller.js @@ -1,8 +1,12 @@ 'use strict'; // Forms controller -angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope', '$stateParams', '$state', 'Forms', 'CurrentForm', '$http', '$uibModal', 'myForm', '$filter', - function($rootScope, $scope, $stateParams, $state, Forms, CurrentForm, $http, $uibModal, myForm, $filter) { +angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope', '$stateParams', '$state', 'Forms', 'CurrentForm', '$http', '$uibModal', 'myForm', '$filter', '$sce', + function($rootScope, $scope, $stateParams, $state, Forms, CurrentForm, $http, $uibModal, myForm, $filter, $sce) { + + $scope.trustSrc = function(src) { + return $sce.trustAsResourceUrl(src); + }; $scope = $rootScope; $scope.animationsEnabled = true; @@ -11,24 +15,34 @@ angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope CurrentForm.setForm($scope.myform); - $scope.formURL = $scope.myform.admin.username + '.tellform.com'; + $scope.formURL = "/#!/forms/" + $scope.myform._id; - $scope.tabData = [ + + console.log($scope.myform); + $scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host + "/#!/forms/" + $scope.myform._id; + + + var refreshFrame = $scope.refreshFrame = function(){ + document.getElementById('iframe').contentWindow.location.reload(); + }; + + + $scope.tabData = [ { heading: $filter('translate')('CREATE_TAB'), - route: 'viewForm.create' + templateName: 'create' }, - { + /*{ heading: $filter('translate')('DESIGN_TAB'), - route: 'viewForm.design' - }, + templateName: 'design' + },*/ { heading: $filter('translate')('CONFIGURE_TAB'), - route: 'viewForm.configure' + templateName: 'configure' }, { heading: $filter('translate')('ANALYZE_TAB'), - route: 'viewForm.analyze' + templateName: 'analyze' } ]; @@ -93,6 +107,7 @@ angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope // Update existing Form $scope.update = $rootScope.update = function(updateImmediately, cb){ + refreshFrame(); var continueUpdate = true; if(!updateImmediately){ diff --git a/public/modules/forms/admin/views/admin-form.client.view.html b/public/modules/forms/admin/views/admin-form.client.view.html index 74d9e5a3..4f680e14 100644 --- a/public/modules/forms/admin/views/admin-form.client.view.html +++ b/public/modules/forms/admin/views/admin-form.client.view.html @@ -2,7 +2,7 @@
-