Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"components-font-awesome": "~4.3.0",
"angular-sanitize": "1.3.16",
"jquery": "~2.1.3",
"angular-re-captcha": "~0.2.0"
"angular-re-captcha": "~0.2.0",
"angular-qr": "latest"
}
}
6 changes: 6 additions & 0 deletions src/client/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<script src="js/safeUrlEncoder.js"></script>
<script src="js/QueryFilter.js"></script>

<!-- QR Code generator -->
<script type="text/javascript" src="lib/angular-qr/lib/qrcode.js"></script>
<script type="text/javascript" src="lib/angular-qr/angular-qr.min.js"></script>


</head>
<body ng-app="x-registries" ng-class="{'login-page': !security.currentUser.systemCredentials.login.loginName}">
Expand All @@ -61,6 +65,8 @@

<nav>
<ul>
<li ng-show="isMobile"><a href="membery://index"><i class="icon-arrow-left"></i></a></li>
<li ng-show="isiOS"><a href="javascript:history.go(-1);"><i class="icon-arrow-left"></i></a></li>
<li ng-show="hasPermissions(['System User'])"><span class="text-block"
>{{security.currentUser.baseData.name}}&nbsp;{{security.currentUser.baseData.surName}}</span></li>
<li ng-show="hasPermissions(['System User'])"><div class="x-login-photo" ng-style="{'background-image': 'url(' + security.currentUser.photoInfo.photo + ')'}"></div>
Expand Down
299 changes: 230 additions & 69 deletions src/client/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 21 additions & 2 deletions src/client/js/x-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
'xpsui:controllers',
'pascalprecht.translate',
'ui.ace',
'reCAPTCHA'
'reCAPTCHA',
'ja.qr',

// 'x-security',
// 'personal-page',
Expand Down Expand Up @@ -83,6 +84,9 @@
$routeProvider.when('/registry/view/:schema/:id', {templateUrl: '/partials/x-registry-view.html', controller: 'xpsui:RegistryViewCtrl'});
$routeProvider.when('/registry/search/:schema', {templateUrl : 'partials/x-registry-search.html', controller : 'xpsui:RegistrySearchCtrl'});

$routeProvider.when('/2/registry/search/:schema', {templateUrl : 'partials/registry-search-v2.html', controller : 'xpsui:RegistrySearchV2Ctrl'});
$routeProvider.when('/2/registry/view/:schema/:id', {templateUrl: '/partials/registry-view-v2.html', controller: 'xpsui:RegistryViewV2Ctrl'});

$routeProvider.when('/registry/custom/:template/:schema/:id', {templateUrl: function(params) {
return '/dataset/get/partials/' + params.template;
}, controller: 'xpsui:RegistryCustomTemplateCtrl',permissions:['Registry - read']});
Expand All @@ -94,6 +98,7 @@
$routeProvider.when('/portal/edit/:id?', {templateUrl: '/partials/x-portal-edit.html', controller: 'xpsui:PortalEditorCtrl',permissions:['Portal - write']});
$routeProvider.when('/portal/menu', {templateUrl: '/partials/x-portal-menu.html', controller: 'xpsui:PortalEditorMenuCtrl',permissions:['Portal - write']});
$routeProvider.when('/portal/list', {templateUrl: '/partials/x-portal-list.html', controller: 'xpsui:PortalEditorListCtrl',permissions:['Portal - write']});
$routeProvider.when('/pushnotification', {templateUrl : 'partials/x-push-notification.html', controller: 'xpsui:PushNotificationCtrl',permissions:['Security - read']})

$routeProvider.when('/schema/edit', {
templateUrl: 'partials/x-schema-editor-index.html',
Expand Down Expand Up @@ -129,7 +134,21 @@
* Main function, initializes all required data and scopes. For configuration of $providers
* use .config
*/
.run(["$rootScope", '$location', 'xpsui:SecurityService', '$cookies','xpsui:NotificationFactory', function($rootScope, $location, SecurityService,$cookies,notificationFactory) {
.run(["$rootScope", '$location', 'xpsui:SecurityService', '$cookies','xpsui:NotificationFactory', '$window', function($rootScope, $location, SecurityService,$cookies,notificationFactory, $window) {
if($window.navigator && $window.navigator.userAgent) {
if($window.navigator.userAgent.indexOf("Crosswalk") > -1 ) {
$rootScope.isMobile = true;
$rootScope.isiOS = false;
} else if($window.navigator.userAgent.match(/iPad/i) || $window.navigator.userAgent.match(/iPhone/i)) {
$rootScope.isiOS = true;
$rootScope.isMobile = false;
} else {
$rootScope.isMobile = false;
$rootScope.isiOS = false;
}
} else {
$rootScope.isMobile = false;
}
$rootScope.security = $rootScope.security || {};
// by default, current user is undefined, as there is noone logged in
$rootScope.hasPermissions=SecurityService.hasPermissions;
Expand Down
40 changes: 36 additions & 4 deletions src/client/js/x-translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,15 @@
"portal.edit.block.description":"Popis:",
"portal.menu.title":"Portálové menu",
"portal.menu.cancel":"Zrušiť",
"portal.menu.send":"Odoslať"
"portal.menu.send":"Odoslať",

"pushnotification.title":"Push Notification",
"pushnotification.textlabel":"Enter a message to send through push notification.",
"pushnotification.send":"Odoslať",
"pushnotification.sent":"Push notification was sent successfully",
"pushnotification.selectall":"Select all",
"pushnotification.save":"Save",
"pushnotification.api":"API Key"
});

$translateProvider.translations('cz', {
Expand Down Expand Up @@ -1101,7 +1109,15 @@
"portal.edit.block.description":"Popis:",
"portal.menu.title":"Portálové menu",
"portal.menu.cancel":"Zrušit",
"portal.menu.send":"Odeslat"
"portal.menu.send":"Odeslat",

"pushnotification.title":"Push Notification",
"pushnotification.textlabel":"Enter a message to send through push notification.",
"pushnotification.send":"Odoslať",
"pushnotification.sent":"Push notification was sent successfully",
"pushnotification.selectall":"Select all",
"pushnotification.save":"Save",
"pushnotification.api":"API Key"
});

$translateProvider.translations('en', {
Expand Down Expand Up @@ -1625,7 +1641,15 @@
"portal.edit.block.description":"Description:",
"portal.menu.title":"Portal menu",
"portal.menu.cancel":"Cancel",
"portal.menu.send":"Send"
"portal.menu.send":"Send",

"pushnotification.title":"Push Notification",
"pushnotification.textlabel":"Enter a message to send through push notification.",
"pushnotification.send":"Send",
"pushnotification.sent":"Push notification was sent successfully",
"pushnotification.selectall":"Select all",
"pushnotification.save":"Save",
"pushnotification.api":"API Key"
});

$translateProvider.translations('ja', {
Expand Down Expand Up @@ -2171,7 +2195,15 @@ $translateProvider.translations('ja', {
"portal.edit.block.description":"Description:",
"portal.menu.title":"Portal menu",
"portal.menu.cancel":"Cancel",
"portal.menu.send":"Send"
"portal.menu.send":"Send",

"pushnotification.title":"Push Notification",
"pushnotification.textlabel":"Enter a message to send through push notification.",
"pushnotification.send":"Send",
"pushnotification.sent":"Push notification was sent successfully",
"pushnotification.selectall":"Select all",
"pushnotification.save":"Save",
"pushnotification.api":"API Key"
});

//fallback for individual missing transCodes
Expand Down
19 changes: 15 additions & 4 deletions src/client/js/xpsui/controller/help-page-ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,21 @@

angular.module('xpsui:controllers')
.controller('xpsui:HelpPageCtrl', [
"$scope",
function($scope) {
$scope.greeting = 'Help';
console.log($scope.greeting);
"$scope",
"$location",
'$cookies',
function($scope, $location, $cookies) {
if ($cookies.loginName) {
$scope.loggedin=true;
} else {
$scope.loggedin = false;
}

var url = $location.absUrl().replace('#/help', '');
var token = $cookies.securityToken;
$scope.genQrcode = function(bannerDat) {
$scope.qrcode = '{"loginName": "' + $cookies.loginName + '", "bannerDat":"' + bannerDat + '", "url":"' + url + '"}';
}
}
]);
}(window.angular));
Loading