From 97fdce5c096daabd70b301588a2fc4882a73c7de Mon Sep 17 00:00:00 2001 From: arzynik Date: Tue, 13 Aug 2013 00:15:53 -0700 Subject: [PATCH] added static help and legal pages for native apps --- .../default/crunchbutton/frontend/help.phtml | 6 +++++- .../default/crunchbutton/frontend/legal.phtml | 6 +++++- www/assets/js/pages.js | 21 ++++++++++++------- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/include/views/default/crunchbutton/frontend/help.phtml b/include/views/default/crunchbutton/frontend/help.phtml index c2d13d209..470d9fbed 100644 --- a/include/views/default/crunchbutton/frontend/help.phtml +++ b/include/views/default/crunchbutton/frontend/help.phtml @@ -1 +1,5 @@ -
\ No newline at end of file +export) : ?> +
+ + display('help/index')?> + \ No newline at end of file diff --git a/include/views/default/crunchbutton/frontend/legal.phtml b/include/views/default/crunchbutton/frontend/legal.phtml index 43685b3b0..137bf2796 100644 --- a/include/views/default/crunchbutton/frontend/legal.phtml +++ b/include/views/default/crunchbutton/frontend/legal.phtml @@ -1 +1,5 @@ -
\ No newline at end of file +export) : ?> +
+ + display('legal/index')?> + \ No newline at end of file diff --git a/www/assets/js/pages.js b/www/assets/js/pages.js index dd5cfa12e..e4a145049 100644 --- a/www/assets/js/pages.js +++ b/www/assets/js/pages.js @@ -2,9 +2,11 @@ * legal page */ NGApp.controller('legal', function ($scope, $http) { - $http.get(App.service + 'legal').success(function(data) { - $scope.legal = data.data; - }); + if (!App.isPhoneGap) { + $http.get(App.service + 'legal').success(function(data) { + $scope.legal = data.data; + }); + } }); @@ -12,10 +14,15 @@ NGApp.controller('legal', function ($scope, $http) { * help page */ NGApp.controller('help', function ($scope, $http) { - $http.get(App.service + 'help').success(function(data) { - $scope.help = data.data; - $('.crunchbutton-join-mail').html('moc.nottubhcnurc@nioj'.split('').reverse().join('')); - }); + var fm = function() { + $('.crunchbutton-join-mail').html('moc.nottubhcnurc@nioj'.split('').reverse().join('')); + } + if (!App.isPhoneGap) { + $http.get(App.service + 'help').success(function(data) { + $scope.help = data.data; + fm(); + }); + } });