Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
#35 Overwriting app directory, will use github to see what's different
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrudin committed Jun 28, 2016
1 parent 5fa2529 commit 8c42133
Show file tree
Hide file tree
Showing 29 changed files with 763 additions and 683 deletions.
4 changes: 2 additions & 2 deletions templates/src/main/webapp/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
'app.login',
'app.root',
'app.search',
'app.uploader',
'app.user',
'ui.bootstrap',
'ui.router',
'ml.esri-maps'
'ui.tinymce',
'ngToast'
]);

}());
11 changes: 7 additions & 4 deletions templates/src/main/webapp/app/create/create.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
angular.module('app.create')
.controller('CreateCtrl', CreateCtrl);

CreateCtrl.$inject = ['$scope', 'MLRest', '$state', 'userService'];
CreateCtrl.$inject = ['$scope', 'MLRest', '$state', 'userService', 'ngToast'];

function CreateCtrl($scope, mlRest, $state, userService) {
function CreateCtrl($scope, mlRest, $state, userService, toast) {
var ctrl = this;

angular.extend(ctrl, {
Expand All @@ -24,8 +24,10 @@
address: null,
about: null,
registered: null,
latitude: 0,
longitude: 0,
location: {
latitude: 0,
longitude: 0
},
tags: [],
friends: [],
greeting: null,
Expand All @@ -51,6 +53,7 @@
// 'perm:sample-role': 'read',
// 'perm:sample-role': 'update'
}).then(function(response) {
toast.success('Record created.');
$state.go('root.view', { uri: response.replace(/(.*\?uri=)/, '') });
});
}
Expand Down
6 changes: 3 additions & 3 deletions templates/src/main/webapp/app/create/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ <h2 class="col-sm-10">Create a Document</h2>
<div class="form-group">
<label class="col-sm-2 control-label">Location</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="ctrl.person.latitude" placeholder="">
<input type="text" class="form-control" ng-model="ctrl.person.location.latitude" placeholder="">
</div>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="ctrl.person.longitude" placeholder="">
<input type="text" class="form-control" ng-model="ctrl.person.location.longitude" placeholder="">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Tags</label>
<div class="col-sm-10">
<input type="text" ng-model="ctrl.newTag"/>
<input type="text" ng-model="ctrl.newTag">
<button class="add-feature btn btn-default btn-sm" ng-click="ctrl.addTag()">Add</button>
</div>
<div class="col-sm-10 col-sm-offset-2">
Expand Down
2 changes: 1 addition & 1 deletion templates/src/main/webapp/app/create/create.module.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function () {
'use strict';

angular.module('app.create', ['ml.common', 'app.user']);
angular.module('app.create', ['ml.common', 'app.user', 'ngToast']);
}());
1 change: 1 addition & 0 deletions templates/src/main/webapp/app/detail/detail.controller.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global X2JS,vkbeautify */
(function () {
'use strict';
angular.module('app.detail')
Expand Down
27 changes: 13 additions & 14 deletions templates/src/main/webapp/app/detail/detail.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
<div class="row detail">
<div class="col-sm-8">
<tabset type="pills">
<tab active="true">
<tab-heading>{{ctrl.type | uppercase}}</tab-heading>
<div class="col-sm-9">
<uib-tabset type="pills">
<uib-tab active="true">
<uib-tab-heading>{{ctrl.type | uppercase}}</uib-tab-heading>
<div class="col-sm-9 bottom-buffer">
<json-explorer ng-if="ctrl.type==='json'" data="ctrl.json"></json-explorer>
<pre ng-if="ctrl.type!=='json'" class="pre-xml">{{ctrl.xml}}</pre>

<a ng-if="ctrl.type==='binary'" target="_blank" ng-href="/v1/documents?uri={{ctrl.uri}}&transform=download" class="btn btn-default">Download</a>

</div>
</tab>
<tab ng-if="ctrl.type!=='json'">
<tab-heading>JSON</tab-heading>
<div class="col-sm-9">
</uib-tab>
<uib-tab ng-if="ctrl.type!=='json'">
<uib-tab-heading>JSON</uib-tab-heading>
<div class="col-sm-9 bottom-buffer">
<json-explorer data="ctrl.json"></json-explorer>
</div>
</tab>
<tab ng-if="ctrl.type==='json'">
<tab-heading >XML</tab-heading>
</uib-tab>
<uib-tab ng-if="ctrl.type==='json'">
<uib-tab-heading >XML</uib-tab-heading>
<div class="col-sm-9">
<pre class="pre-xml">{{ctrl.xml}}</pre>
</div>
</tab>
</tabset>
</uib-tab>
</uib-tabset>
</div>
<div class="col-sm-4">
<!-- show (links to) similar documents -->
Expand Down
1 change: 1 addition & 0 deletions templates/src/main/webapp/app/detail/detail.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
'use strict';

angular.module('app.detail', [
'app.similar',
'ui.router'
]);
}());
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
$httpProvider.interceptors.push('errorInterceptor');
}]);

ErrorInterceptor.$inject = ['$q', '$injector'];
function ErrorInterceptor($q, $injector) {
ErrorInterceptor.$inject = ['$q', '$injector', 'ngToast'];
function ErrorInterceptor($q, $injector, toast) {
var errorInterceptor = {
responseError: function(rejection) {
if (rejection.status === 500 || rejection.status === 400) {
Expand All @@ -25,6 +25,8 @@
};
}
messageBoardService.message(msg);
var toastMsg = '<strong>' + msg.title + '</strong><p>' + msg.body + '</p>';
toast.danger(toastMsg);
}
return $q.reject(rejection);
}
Expand Down
167 changes: 83 additions & 84 deletions templates/src/main/webapp/app/landing/landing.html
Original file line number Diff line number Diff line change
@@ -1,92 +1,91 @@
<h1>Successful Deployment!</h1>
<p>
You can go check out the sample application once you've logged in! If you loaded the documents from the <em>data</em> directory via the instructions in the readme, you should also be able to <a href="/search">search</a> over the included dictionary. The application allows you to <a href="/create">create</a> various people that you can then <a href="/search">search</a>. If you fill out all the fields, you'll be able to use the built-in <em>faceting</em> and <em>typeahead</em> features!
</p>
<p>If you need any help making the application your own refer to the links below:</p>
<div class="row">
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Slush Generator</h3>
</div>
<div class="panel-body">
<ul>
<li><a href="https://github.com/rjrudin/slush-marklogic-spring-boot">marklogic-spring-boot Slush Generator Project Home</a></li>
<li><a href="https://github.com/marklogic/slush-marklogic-node/issues">Upcoming Features and Current Issues</a></li>
<li><a href="https://github.com/marklogic/slush-marklogic-node/wiki">Wiki</a>
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Recommended Guides and Sites</h3>
</div>
<div class="panel-body">
<ul>
<li><a href="https://docs.marklogic.com/">MarkLogic Documentation</a></li>
<li><a href="https://github.com/rjrudin/ml-gradle#how-can-i-start-using-ml-gradle">Deploying MarkLogic Using Gradle</a></li>
<li><a href="https://docs.marklogic.com/guide/rest-dev">MarkLogic REST Application Developer's Guide</a></li>
<li><a href="https://github.com/marklogic">MarkLogic Github and Helpful Tools</a></li>
</ul>
<section class="content-header">
<h1>Successful Deployment! <small>Slush Generator</small></h1>
</section>

<section class="content">
<p>You can go check out the sample application once you've logged in! If you loaded the documents from the <em>data</em> directory via the instructions in the readme, you should also be able to <a href="/search">search</a> over the included dictionary. The application allows you to <a href="/create">create</a> various people that you can then <a href="/search">search</a>. If you fill out all the fields, you'll be able to use the built-in <em>faceting</em> and <em>typeahead</em> features!</p>
<p>If you need any help making the application your own refer to the links below:</p>
<div class="row">
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Slush Generator</h3>
</div>
<div class="panel-body">
<ul>
<li><a href="https://github.com/marklogic/slush-marklogic-node">MarkLogic Slush Generator Project Home</a></li>
<li><a href="https://github.com/marklogic/slush-marklogic-node/issues">Upcoming Features and Current Issues</a></li>
<li><a href="https://github.com/marklogic/slush-marklogic-node/wiki">Wiki</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Stack Technology</h3>
</div>
<div class="panel-body">
<ul>
<li><a href="http://www.marklogic.com">Database - MarkLogic</strong></a></li>
<li><a href="http://gradle.org/">Build - Gradle</a></li>
<li><a href="https://github.com/rjrudin/ml-gradle">Build - ml-gradle</a></li>
<li><a href="http://gulpjs.com/">Build - Gulp</a></li>
<li><a href="http://projects.spring.io/spring-boot/">Middle Tier - Spring Boot</a></li>
<li><a href="https://angularjs.org/">Frontend JS - AngularJS</a></li>
<li><a href="https://angular-ui.github.io/bootstrap/">Frontend JS - UIBootstrap</a></li>
<li><a href="http://getbootstrap.com/">Frontend CSS - Bootstrap</a></li>
<li><a href="http://lesscss.org/">Frontend CSS - LESS</a></li>
</ul>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Recommended Guides and Sites</h3>
</div>
<div class="panel-body">
<ul>
<li><a href="https://docs.marklogic.com/">MarkLogic Documentation</a></li>
<li><a href="https://github.com/marklogic/roxy/wiki">Deploying MarkLogic Using Roxy</a></li>
<li><a href="https://docs.marklogic.com/guide/rest-dev">MarkLogic REST Application Developer's Guide</a></li>
<li><a href="https://github.com/marklogic">MarkLogic Github and Helpful Tools</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">IDE Suggestions</h3>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Stack Technology</h3>
</div>
<div class="panel-body">
<ul>
<li><a href="http://www.marklogic.com">Database - MarkLogic</strong></a></li>
<li><a href="https://github.com/marklogic/roxy">Build - Roxy</a></li>
<li><a href="http://gulpjs.com/">Build - Gulp</a></li>
<li><a href="http://nodejs.org/">Webserver - NodeJS</a></li>
<li><a href="https://angularjs.org/">Frontend JS - AngularJS</a></li>
<li><a href="https://angular-ui.github.io/bootstrap/">Frontend JS - UIBootstrap</a></li>
<li><a href="http://getbootstrap.com/">Frontend CSS - Bootstrap</a></li>
<li><a href="http://lesscss.org/">Frontend CSS - LESS</a></li>
<li><a href="http://karma-runner.github.io">Testing - Karma</a></li>
</ul>
</div>
</div>
<div class="panel-body">
<ul>
<li><a href="http://www.sublimetext.com/3">Sublime Text 3</a>
<ul>
<li><a href="https://sublime.wbond.net/">Package Control</a>:
<ul>
<li><a href="https://github.com/paxtonhare/MarkLogic-Sublime">MarkLogic Plugin</a></li>
<li><a href="https://github.com/uipoet/sublime-jshint">sublime-jshint</a></li>
<li><a href="https://github.com/alexnj/SublimeOnSaveBuild">SublimeOnSaveBuild</a></li>
<li><a href="https://github.com/sindresorhus/editorconfig-sublime">editorconfig-sublime</a></li>
<li><a href="https://github.com/danro/LESS-sublime">LESS (CSS-style highlighting)</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="https://eclipse.org/downloads/">Eclipse</a></li>
<li>TextMate (2alpha)
<ul>
<li><a href="https://github.com/bodnaristvan/JSHint.tmbundle#readme">jshint</a></li>
<li><a href="https://github.com/Mr0grog/editorconfig-textmate#readme">editorconfig</a></li>
<li><a href="https://github.com/paxtonhare/xquery.tmbundle">MarkLogic auto-completion: XQuery.tmbundle</a></li>
</ul>
</li>
</ul>
</div>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">IDE Suggestions</h3>
</div>
<div class="panel-body">
<ul>
<li><a href="http://www.sublimetext.com/3">Sublime Text 3</a>
<ul>
<li><a href="https://sublime.wbond.net/">Package Control</a>:
<ul>
<li><a href="https://github.com/paxtonhare/MarkLogic-Sublime">MarkLogic Plugin</a></li>
<li><a href="https://github.com/uipoet/sublime-jshint">sublime-jshint</a></li>
<li><a href="https://github.com/alexnj/SublimeOnSaveBuild">SublimeOnSaveBuild</a></li>
<li><a href="https://github.com/sindresorhus/editorconfig-sublime">editorconfig-sublime</a></li>
<li><a href="https://github.com/danro/LESS-sublime">LESS (CSS-style highlighting)</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="https://www.jetbrains.com/webstorm/">Webstorm</a></li>
<li>TextMate (2alpha)
<ul>
<li><a href="https://github.com/bodnaristvan/JSHint.tmbundle#readme">jshint</a></li>
<li><a href="https://github.com/Mr0grog/editorconfig-textmate#readme">editorconfig</a></li>
<li><a href="https://github.com/paxtonhare/xquery.tmbundle">MarkLogic auto-completion: XQuery.tmbundle</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<h3></h3>
<ul>

</ul>
</div>
</div>
</section>
16 changes: 8 additions & 8 deletions templates/src/main/webapp/app/login/login.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
angular.module('app.login')
.factory('loginService', LoginService);

LoginService.$inject = ['$http', '$modal', '$q', '$rootScope', '$state',
'$stateParams', 'messageBoardService', '$window'];
function LoginService($http, $modal, $q, $rootScope, $state, $stateParams, messageBoardService, $window) {
LoginService.$inject = ['$http', '$uibModal', '$q', '$rootScope', '$state',
'$stateParams', 'messageBoardService'];
function LoginService($http, $uibModal, $q, $rootScope, $state,
$stateParams, messageBoardService) {

var _loginMode = 'full'; // 'modal', 'top-right', or 'full'
var _loginError;
var _toStateName;
Expand Down Expand Up @@ -68,8 +70,8 @@
function loginPrompt() {
var d = $q.defer();
if (_loginMode === 'modal') {
$modal.open({
controller: ['$modalInstance', function($modalInstance) {
$uibModal.open({
controller: ['$uibModalInstance', function($uibModalInstance) {
var ctrl = this;
ctrl.showCancel = $state.current.name !== 'root.landing';
ctrl.close = function(user) {
Expand All @@ -79,7 +81,7 @@
d.reject();
$state.go('root.landing');
}
return $modalInstance.close();
return $uibModalInstance.close();
};
}],
controllerAs: 'ctrl',
Expand Down Expand Up @@ -112,8 +114,6 @@
_loginError = null;
_isAuthenticated = false;
$state.reload();
// Added this, as just reloading the state wasn't forcing a refresh of the whole page on logout.
$window.location.href = '/';
return response;
});
}
Expand Down
Loading

0 comments on commit 8c42133

Please sign in to comment.