partial #1788
This commit is contained in:
parent
b4922d00d8
commit
1bf12d67a6
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
class Controller_ConnectionError extends Cana_Controller {
|
||||
public function init() {
|
||||
Cana::view()->display('connectionerror/index');
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
<div class="main-content-readable">
|
||||
No internet for you!
|
||||
</div>
|
||||
@ -0,0 +1,3 @@
|
||||
<div class="connection-error" ng-show="connectionError" ng-style="{width: windowWidth, height: windowHeight}">
|
||||
<i class="icon-warning-sign"></i> Sorry no internet connection!
|
||||
</div>
|
||||
@ -1,5 +0,0 @@
|
||||
<? if (!$this->export) : ?>
|
||||
<div ng-bind-html-unsafe="legal"></div>
|
||||
<? else : ?>
|
||||
<?=$this->display('connectionerror/index')?>
|
||||
<? endif ; ?>
|
||||
@ -183,5 +183,6 @@
|
||||
<div ng-include="'assets/view/giftcard.html'"></div>
|
||||
<div ng-include="'assets/view/suggestion.html'"></div>
|
||||
<div ng-include="'assets/view/support.html'"></div>
|
||||
<div ng-include="'assets/view/connection.error.html'"></div>
|
||||
|
||||
<div id="fb-root"></div>
|
||||
|
||||
@ -86,6 +86,18 @@ html[xmlns] .clearfix {
|
||||
.unbold{
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.connection-error{
|
||||
width:100%;
|
||||
z-index:1000;
|
||||
top:0;
|
||||
left:0;
|
||||
position:absolute;
|
||||
background:#FFF;
|
||||
height:100px;
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
/* CUSTOM CHECKBOX */
|
||||
.custom-checkbox{
|
||||
background:url(../images/checkbox-unchecked.png);
|
||||
@ -2846,5 +2858,4 @@ h1.about-header {
|
||||
height: 125px;
|
||||
width: 125px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -129,7 +129,7 @@ NGApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $l
|
||||
}]);
|
||||
|
||||
// global route change items
|
||||
NGApp.controller('AppController', function ($scope, $route, $routeParams, $rootScope, $location, AccountService, MainNavigationService, AccountSignOut, CartService) {
|
||||
NGApp.controller('AppController', function ($scope, $route, $routeParams, $rootScope, $location, $window, AccountService, MainNavigationService, AccountSignOut, CartService) {
|
||||
|
||||
// define external pointers
|
||||
App.rootScope = $rootScope;
|
||||
@ -259,7 +259,20 @@ NGApp.controller('AppController', function ($scope, $route, $routeParams, $rootS
|
||||
}
|
||||
});
|
||||
|
||||
// Make the window's size available to all scope
|
||||
$rootScope.windowWidth = $window.outerWidth;
|
||||
$rootScope.windowHeight = $window.outerHeight;
|
||||
|
||||
// Window resize event
|
||||
angular.element( $window ).bind( 'resize',function(){
|
||||
$rootScope.windowWidth = $window.outerWidth;
|
||||
$rootScope.windowHeight = $window.outerHeight;
|
||||
$rootScope.$apply( 'windowWidth' );
|
||||
$rootScope.$apply( 'windowHeight' );
|
||||
});
|
||||
|
||||
AccountService.checkUser();
|
||||
|
||||
});
|
||||
|
||||
App.alert = function(txt, title) {
|
||||
@ -657,4 +670,20 @@ App.applyIOSPositionFix = function(){
|
||||
}, 300 )
|
||||
}, 200 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Methods used by phoneGap
|
||||
App.noInternet = {
|
||||
show: function(){
|
||||
App.rootScope.connectionError = true;
|
||||
App.rootScope.$safeApply();
|
||||
},
|
||||
hide : function(){
|
||||
App.rootScope.connectionError = false;
|
||||
App.rootScope.$safeApply();
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -742,9 +742,14 @@ NGApp.controller( 'NotificationAlertCtrl', function ( $scope, $rootScope ) {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
NGApp.controller( 'InviteCtrl', function ( $scope, $routeParams, $location, ReferralService ) {
|
||||
// Just store the cookie, it will be used later
|
||||
$.cookie( 'referral', $routeParams.id );
|
||||
$location.path( '/' );
|
||||
});
|
||||
|
||||
NGApp.controller( 'NoInternetCtrl', function ( $scope ) {
|
||||
// Just store the cookie, it will be used later
|
||||
$.cookie( 'referral', $routeParams.id );
|
||||
$location.path( '/' );
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user