Skip to content
This repository was archived by the owner on Oct 5, 2020. It is now read-only.

Commit 50b7724

Browse files
authored
Merge pull request #364 from marklogic/ui-themes
Merging Ui themes
2 parents 8448a4b + 09cf64b commit 50b7724

File tree

76 files changed

+3251
-493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3251
-493
lines changed

app/templates/bower.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,28 @@
22
"name": "@sample-app-name",
33
"version": "0.0.0",
44
"dependencies": {
5+
"jquery": "~2.1.4",
56
"angular": "~1.4.4",
67
"angular-bootstrap": "^1.1",
78
"angular-cookies": "~1.4.4",
89
"angular-highlightjs": "~0.4.3",
910
"angular-mocks": "~1.4.4",
1011
"angular-ui-router": "~0.2.15",
1112
"angular-ui-tinymce": "~0.0.9",
13+
"angular-animate": "~1.4.4",
14+
"ngtoast": "^2.0.0",
1215
"angular-x2js": "https://github.com/janmichaelyu/angular-x2js.git",
1316
"bootstrap": "~3.3.5",
14-
"font-awesome": "~4.4.0",
17+
"font-awesome": "~4.6.0",
1518
"highlightjs":"~8.7.0",
16-
"jquery": "~2.1.4",
1719
"lodash": "~3.10.1",
1820
"ml-search-ng": "~0.2.0",
1921
"ml-utils": "withjam/ml-utils",
2022
"ng-json-explorer": "8c2a0f9104",
2123
"vkbeautify-wrapper": "*",
2224
"highcharts": "^4.2",
23-
"angular-google-maps": "^2.2"
25+
"angular-google-maps": "2.3.2",
26+
"tinymce-dist": "4.3.12"
2427
},
2528
"overrides": {
2629
"angular-highlightjs": {

app/templates/gulp.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ module.exports = function() {
7070
'**/*.module.js',
7171
'**/*.js'
7272
],
73-
less: client + 'styles/**/main.less',
73+
less: client + 'styles/**/*.less',
74+
mainLess: client + 'styles/**/main.less',
7475
report: report,
7576
root: root,
7677
server: server,

app/templates/gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ gulp.task('styles', ['clean-styles'], function() {
7676
});
7777

7878
return gulp
79-
.src(config.less)
79+
.src(config.mainLess)
8080
.pipe($.plumber()) // exit gracefully if something fails after this
8181
.pipe(less)
8282
.pipe($.autoprefixer({browsers: ['last 2 version', '> 5%']}))

app/templates/node-server/proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function getAuth(options, session) {
8181
// Generic proxy function used by multiple HTTP verbs
8282
function proxy(req, res) {
8383
var queryString = req.originalUrl.split('?')[1];
84-
var path = '/v1' + req.path + (queryString ? '?' + queryString : '');
84+
var path = req.baseUrl + req.path + (queryString ? '?' + queryString : '');
8585
console.log(
8686
req.method + ' ' + req.path + ' proxied to ' +
8787
options.mlHost + ':' + options.mlHttpPort + path);

app/templates/rest-api/config/options/all.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@
9292
</range>
9393
</constraint>
9494

95+
<!-- Example geospatial facet based on the sample-data, used by map theme -->
96+
<constraint name="Location">
97+
<geo-elem-pair>
98+
<parent ns="" name="location"/>
99+
<lat ns="" name="latitude"/>
100+
<lon ns="" name="longitude"/>
101+
<geo-option>boundaries-included</geo-option>
102+
<geo-option>score-function=reciprocal</geo-option>
103+
<heatmap s="-90" w="-180" n="90" e="180" latdivs="4" londivs="4"/>
104+
</geo-elem-pair>
105+
</constraint>
106+
95107
<!-- example facet constraint below -->
96108
<!--
97109
<constraint name="myconstraint">
@@ -113,4 +125,8 @@
113125
</suggestion-source>
114126
-->
115127

128+
<!-- This will extract the latitude and longitude from the search. -->
129+
<extract-document-data selected="all">
130+
</extract-document-data>
131+
116132
</options>

app/templates/sample-data.zip

231 KB
Binary file not shown.

app/templates/ui/app/app.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
'app.user',
1717
'ui.bootstrap',
1818
'ui.router',
19-
'ui.tinymce'
19+
'ui.tinymce',
20+
'ngToast'
2021
]);
2122

2223
}());

app/templates/ui/app/create/create.controller.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
angular.module('app.create')
55
.controller('CreateCtrl', CreateCtrl);
66

7-
CreateCtrl.$inject = ['$scope', 'MLRest', '$state', 'userService'];
7+
CreateCtrl.$inject = ['$scope', 'MLRest', '$state', 'userService', 'ngToast'];
88

9-
function CreateCtrl($scope, mlRest, $state, userService) {
9+
function CreateCtrl($scope, mlRest, $state, userService, toast) {
1010
var ctrl = this;
1111

1212
angular.extend(ctrl, {
@@ -24,8 +24,10 @@
2424
address: null,
2525
about: null,
2626
registered: null,
27-
latitude: 0,
28-
longitude: 0,
27+
location: {
28+
latitude: 0,
29+
longitude: 0
30+
},
2931
tags: [],
3032
friends: [],
3133
greeting: null,
@@ -51,6 +53,7 @@
5153
// 'perm:sample-role': 'read',
5254
// 'perm:sample-role': 'update'
5355
}).then(function(response) {
56+
toast.success('Record created.');
5457
$state.go('root.view', { uri: response.replace(/(.*\?uri=)/, '') });
5558
});
5659
}

app/templates/ui/app/create/create.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ <h2 class="col-sm-10">Create a Document</h2>
8282
<div class="form-group">
8383
<label class="col-sm-2 control-label">Location</label>
8484
<div class="col-sm-5">
85-
<input type="text" class="form-control" ng-model="ctrl.person.latitude" placeholder="">
85+
<input type="text" class="form-control" ng-model="ctrl.person.location.latitude" placeholder="">
8686
</div>
8787
<div class="col-sm-5">
88-
<input type="text" class="form-control" ng-model="ctrl.person.longitude" placeholder="">
88+
<input type="text" class="form-control" ng-model="ctrl.person.location.longitude" placeholder="">
8989
</div>
9090
</div>
9191
<div class="form-group">
9292
<label class="col-sm-2 control-label">Tags</label>
9393
<div class="col-sm-10">
94-
<input type="text" ng-model="ctrl.newTag"/>
94+
<input type="text" ng-model="ctrl.newTag">
9595
<button class="add-feature btn btn-default btn-sm" ng-click="ctrl.addTag()">Add</button>
9696
</div>
9797
<div class="col-sm-10 col-sm-offset-2">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function () {
22
'use strict';
33

4-
angular.module('app.create', ['ml.common', 'app.user']);
4+
angular.module('app.create', ['ml.common', 'app.user', 'ngToast']);
55
}());

0 commit comments

Comments
 (0)