This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('App').controller('OnlytomeCtrl', | |
| function ($scope, $cookies, Http, $route, $location, $translate,Profile, Searches, ProfileSegments, TopCategories) { | |
| $scope.mainNav = null; | |
| $scope.subNav = null; | |
| $scope.currentUser = null; | |
| $scope.selectedTopCategory = null; | |
| $scope.searches = []; | |
| Http.authenticate().then( function(){ | |
| Profile.load(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form novalidate name="signupForm" ng-submit="onSingupSubmit()" ng-controller="SignupCtrl"> | |
| <div class="account-form white-rounded-top"> | |
| <h3 translate>PAGE_ACCOUNT.SIGNUP</h3> | |
| <div ng-repeat="error in errors" class="alert alert-danger" translate>{{error}}</div> | |
| <div ng-repeat="info in infos" class="alert alert-info" translate>{{info}}</div> | |
| <div class="form-group" ng-class="{'has-error': signupForm.login.$invalid}"> | |
| <input class="form-control" ng-model="account.login" type="email" name="login" placeholder="{{'PAGE_ACCOUNT.EMAIL' | translate }}" required> | |
| <span class="help-block" ng-show="signupForm.login.$invalid" translate>PAGE_ACCOUNT.EMAIL_VALID_HELPER</span> | |
| </div> | |
| <div class="form-group" ng-class="{'has-error': signupForm.password.$invalid}"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @font-face { | |
| font-family: 'icon_ezakusregular'; | |
| src: url('icon_ezakus-regular-webfont.eot'); | |
| src: url('icon_ezakus-regular-webfont.eot?#iefix') format('embedded-opentype'), | |
| url('icon_ezakus-regular-webfont.woff') format('woff'), | |
| url('icon_ezakus-regular-webfont.ttf') format('truetype'); | |
| font-weight: normal; | |
| font-style: normal; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('App').controller('AccountCtrl', function($scope, Account, Profile) { | |
| $scope.login = ''; | |
| $scope.password = ''; | |
| $scope.passwordConfirm = ''; | |
| function signin() { | |
| Account.signin($scope.login, $scope.password); | |
| } | |
| function signout() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Wrapper for http services | |
| angular.module('App').factory('Http', function($q, $http) { | |
| var defaultHeaders = {}; | |
| var token = null; | |
| var BID = null; | |
| function query(config){ | |
| if (bid == null || token == null) { | |
| token = getToken(). | |
| then( function success(value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| App.factory('AuthService', function($http) { | |
| return $http({ | |
| method: 'POST', | |
| url: AUTHEN_BASE_URL, | |
| data: AUTHEN_PARAMS, | |
| headers: {'Content-Type': 'application/x-www-form-urlencoded'} | |
| }) | |
| .then( | |
| function success(response) { | |
| $http.defaults.headers.common['X-EZ-USER'] = '[email protected]'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function changecss(myclass,element,value) { | |
| var CSSRules; | |
| if (document.all) { | |
| CSSRules = 'rules' | |
| } | |
| else if (document.getElementById) { | |
| CSSRules = 'cssRules' | |
| } | |
| for (var i = 0; i < document.styleSheets[0][CSSRules].length; i++) { | |
| if (document.styleSheets[0][CSSRules][i].selectorText == myclass) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| /*$(".nice-list-head").click(function(){ | |
| $(".nice-list-head", this).toggle(); | |
| });*/ | |
| $(".nice-list-toogler").click(function(){ | |
| var parent = $(this).parent(); | |
| var target; | |
| $(".nice-list-selection", parent).toggle(); | |
| target.toggle(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var FourColors = function(inactive, inactiveHover, active, activeHover) { | |
| this.inactive = inactive; | |
| this.inactiveHover = inactiveHover; | |
| this.active = active ; | |
| this.activeHover = activeHover; | |
| } | |
| var Category = function(id, name, icon, colors) { | |
| this.id = id; | |
| this.name = name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // KnockoutModels | |
| var viewModel = { | |
| self: this, | |
| userSelection: ko.observableArray([] | |
| ), | |
| categories: ko.observableArray( | |
| [ | |
| { col_off_hover: "#BAD9CD", col_on: "#1A805A", col_on_hover: "#156648", id: 1, name: "Alimentation", ico: "A" }, |