Cleaned folder heirarchy

This commit is contained in:
Mo Bitar
2018-01-19 12:42:44 -06:00
parent 5be2402f65
commit 5d43697ed8
86 changed files with 75 additions and 91 deletions

View File

@@ -34,7 +34,7 @@ module.exports = function(grunt) {
style: 'expanded' style: 'expanded'
}, },
files: { files: {
'vendor/assets/stylesheets/app.css': 'app/assets/stylesheets/frontend.css.scss' 'vendor/assets/stylesheets/app.css': 'app/assets/stylesheets/main.css.scss'
} }
} }
}, },
@@ -59,7 +59,7 @@ module.exports = function(grunt) {
src: ['**/*.html'], src: ['**/*.html'],
dest: 'vendor/assets/javascripts/templates.js', dest: 'vendor/assets/javascripts/templates.js',
options: { options: {
module: 'app.frontend' module: 'app'
} }
} }
}, },
@@ -70,12 +70,13 @@ module.exports = function(grunt) {
}, },
app: { app: {
src: [ src: [
'app/assets/javascripts/app/services/encryption/*.js', 'app/assets/javascripts/app/services/encryption/*.js', // this should come first
'app/assets/javascripts/app/*.js', 'app/assets/javascripts/app/*.js',
'app/assets/javascripts/app/frontend/*.js', 'app/assets/javascripts/app/controllers/**/*.js',
'app/assets/javascripts/app/frontend/controllers/*.js', 'app/assets/javascripts/app/models/**/*.js',
'app/assets/javascripts/app/frontend/models/**/*.js', 'app/assets/javascripts/app/services/**/*.js',
'app/assets/javascripts/app/services/**/*.js' 'app/assets/javascripts/app/filters/**/*.js',
'app/assets/javascripts/app/directives/**/*.js',
], ],
dest: 'vendor/assets/javascripts/app.js', dest: 'vendor/assets/javascripts/app.js',
}, },

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

View File

@@ -13,7 +13,7 @@ if(!IEOrEdge && (window.crypto && window.crypto.subtle)) {
Neeto.crypto = new SNCryptoJS(); Neeto.crypto = new SNCryptoJS();
} }
angular.module('app.frontend', []) angular.module('app', [])
function getParameterByName(name, url) { function getParameterByName(name, url) {
name = name.replace(/[\[\]]/g, "\\$&"); name = name.replace(/[\[\]]/g, "\\$&");

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend') angular.module('app')
.directive("editorSection", function($timeout, $sce){ .directive("editorSection", function($timeout, $sce){
return { return {
restrict: 'E', restrict: 'E',
@@ -8,7 +8,7 @@ angular.module('app.frontend')
note: "=", note: "=",
updateTags: "&" updateTags: "&"
}, },
templateUrl: 'frontend/editor.html', templateUrl: 'editor.html',
replace: true, replace: true,
controller: 'EditorCtrl', controller: 'EditorCtrl',
controllerAs: 'ctrl', controllerAs: 'ctrl',

View File

@@ -1,9 +1,9 @@
angular.module('app.frontend') angular.module('app')
.directive("footer", function(authManager){ .directive("footer", function(authManager){
return { return {
restrict: 'E', restrict: 'E',
scope: {}, scope: {},
templateUrl: 'frontend/footer.html', templateUrl: 'footer.html',
replace: true, replace: true,
controller: 'FooterCtrl', controller: 'FooterCtrl',
controllerAs: 'ctrl', controllerAs: 'ctrl',

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend') angular.module('app')
.controller('HomeCtrl', function ($scope, $location, $rootScope, $timeout, modelManager, .controller('HomeCtrl', function ($scope, $location, $rootScope, $timeout, modelManager,
dbManager, syncManager, authManager, themeManager, passcodeManager, storageManager, migrationManager) { dbManager, syncManager, authManager, themeManager, passcodeManager, storageManager, migrationManager) {

View File

@@ -2,7 +2,7 @@ class LockScreen {
constructor() { constructor() {
this.restrict = "E"; this.restrict = "E";
this.templateUrl = "frontend/lock-screen.html"; this.templateUrl = "lock-screen.html";
this.scope = { this.scope = {
onSuccess: "&", onSuccess: "&",
}; };
@@ -27,4 +27,4 @@ class LockScreen {
} }
angular.module('app.frontend').directive('lockScreen', () => new LockScreen); angular.module('app').directive('lockScreen', () => new LockScreen);

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend') angular.module('app')
.directive("notesSection", function(){ .directive("notesSection", function(){
return { return {
scope: { scope: {
@@ -7,7 +7,7 @@ angular.module('app.frontend')
tag: "=" tag: "="
}, },
templateUrl: 'frontend/notes.html', templateUrl: 'notes.html',
replace: true, replace: true,
controller: 'NotesCtrl', controller: 'NotesCtrl',
controllerAs: 'ctrl', controllerAs: 'ctrl',

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend') angular.module('app')
.directive("tagsSection", function(){ .directive("tagsSection", function(){
return { return {
restrict: 'E', restrict: 'E',
@@ -13,7 +13,7 @@ angular.module('app.frontend')
updateNoteTag: "&", updateNoteTag: "&",
removeTag: "&" removeTag: "&"
}, },
templateUrl: 'frontend/tags.html', templateUrl: 'tags.html',
replace: true, replace: true,
controller: 'TagsCtrl', controller: 'TagsCtrl',
controllerAs: 'ctrl', controllerAs: 'ctrl',

View File

@@ -1,5 +1,5 @@
angular angular
.module('app.frontend') .module('app')
.directive('snAutofocus', ['$timeout', function($timeout) { .directive('snAutofocus', ['$timeout', function($timeout) {
return { return {
restrict: 'A', restrict: 'A',

View File

@@ -1,5 +1,5 @@
angular angular
.module('app.frontend') .module('app')
.directive('clickOutside', ['$document', function($document) { .directive('clickOutside', ['$document', function($document) {
return { return {
restrict: 'A', restrict: 'A',

View File

@@ -1,5 +1,5 @@
angular angular
.module('app.frontend') .module('app')
.directive('delayHide', function($timeout) { .directive('delayHide', function($timeout) {
return { return {
restrict: 'A', restrict: 'A',

View File

@@ -1,5 +1,5 @@
angular angular
.module('app.frontend') .module('app')
.directive('fileChange', function() { .directive('fileChange', function() {
return { return {
restrict: 'A', restrict: 'A',

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend').directive('infiniteScroll', [ angular.module('app').directive('infiniteScroll', [
'$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) { '$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) {
return { return {
link: function(scope, elem, attrs) { link: function(scope, elem, attrs) {

View File

@@ -1,5 +1,5 @@
angular angular
.module('app.frontend') .module('app')
.directive('lowercase', function() { .directive('lowercase', function() {
return { return {
require: 'ngModel', require: 'ngModel',

View File

@@ -1,5 +1,5 @@
angular angular
.module('app.frontend') .module('app')
.directive('selectOnClick', ['$window', function ($window) { .directive('selectOnClick', ['$window', function ($window) {
return { return {
restrict: 'A', restrict: 'A',

View File

@@ -2,7 +2,7 @@ class AccountMenu {
constructor() { constructor() {
this.restrict = "E"; this.restrict = "E";
this.templateUrl = "frontend/directives/account-menu.html"; this.templateUrl = "directives/account-menu.html";
this.scope = { this.scope = {
"onSuccessfulAuth" : "&", "onSuccessfulAuth" : "&",
"closeFunction" : "&" "closeFunction" : "&"
@@ -584,4 +584,4 @@ class AccountMenu {
} }
} }
angular.module('app.frontend').directive('accountMenu', () => new AccountMenu); angular.module('app').directive('accountMenu', () => new AccountMenu);

View File

@@ -2,7 +2,7 @@ class ActionsMenu {
constructor() { constructor() {
this.restrict = "E"; this.restrict = "E";
this.templateUrl = "frontend/directives/actions-menu.html"; this.templateUrl = "directives/actions-menu.html";
this.scope = { this.scope = {
item: "=" item: "="
}; };
@@ -83,4 +83,4 @@ class ActionsMenu {
} }
angular.module('app.frontend').directive('actionsMenu', () => new ActionsMenu); angular.module('app').directive('actionsMenu', () => new ActionsMenu);

View File

@@ -2,7 +2,7 @@ class ComponentModal {
constructor() { constructor() {
this.restrict = "E"; this.restrict = "E";
this.templateUrl = "frontend/directives/component-modal.html"; this.templateUrl = "directives/component-modal.html";
this.scope = { this.scope = {
show: "=", show: "=",
component: "=", component: "=",
@@ -39,4 +39,4 @@ class ComponentModal {
} }
angular.module('app.frontend').directive('componentModal', () => new ComponentModal); angular.module('app').directive('componentModal', () => new ComponentModal);

View File

@@ -2,7 +2,7 @@ class ComponentView {
constructor(componentManager, $timeout) { constructor(componentManager, $timeout) {
this.restrict = "E"; this.restrict = "E";
this.templateUrl = "frontend/directives/component-view.html"; this.templateUrl = "directives/component-view.html";
this.scope = { this.scope = {
component: "=" component: "="
}; };
@@ -71,4 +71,4 @@ class ComponentView {
} }
angular.module('app.frontend').directive('componentView', (componentManager, $timeout) => new ComponentView(componentManager, $timeout)); angular.module('app').directive('componentView', (componentManager, $timeout) => new ComponentView(componentManager, $timeout));

View File

@@ -2,7 +2,7 @@ class EditorMenu {
constructor() { constructor() {
this.restrict = "E"; this.restrict = "E";
this.templateUrl = "frontend/directives/editor-menu.html"; this.templateUrl = "directives/editor-menu.html";
this.scope = { this.scope = {
callback: "&", callback: "&",
selectedEditor: "=" selectedEditor: "="
@@ -68,4 +68,4 @@ class EditorMenu {
} }
angular.module('app.frontend').directive('editorMenu', () => new EditorMenu); angular.module('app').directive('editorMenu', () => new EditorMenu);

View File

@@ -2,7 +2,7 @@ class GlobalExtensionsMenu {
constructor() { constructor() {
this.restrict = "E"; this.restrict = "E";
this.templateUrl = "frontend/directives/global-extensions-menu.html"; this.templateUrl = "directives/global-extensions-menu.html";
this.scope = { this.scope = {
}; };
} }
@@ -212,4 +212,4 @@ class GlobalExtensionsMenu {
} }
angular.module('app.frontend').directive('globalExtensionsMenu', () => new GlobalExtensionsMenu); angular.module('app').directive('globalExtensionsMenu', () => new GlobalExtensionsMenu);

View File

@@ -3,7 +3,7 @@ class MenuRow {
constructor() { constructor() {
this.restrict = "E"; this.restrict = "E";
this.transclude = true; this.transclude = true;
this.templateUrl = "frontend/directives/menu-row.html"; this.templateUrl = "directives/menu-row.html";
this.scope = { this.scope = {
circle: "=", circle: "=",
title: "=", title: "=",
@@ -28,4 +28,4 @@ class MenuRow {
} }
} }
angular.module('app.frontend').directive('menuRow', () => new MenuRow); angular.module('app').directive('menuRow', () => new MenuRow);

View File

@@ -2,7 +2,7 @@ class PanelResizer {
constructor() { constructor() {
this.restrict = "E"; this.restrict = "E";
this.templateUrl = "frontend/directives/panel-resizer.html"; this.templateUrl = "directives/panel-resizer.html";
this.scope = { this.scope = {
index: "=", index: "=",
panelId: "=", panelId: "=",
@@ -198,4 +198,4 @@ class PanelResizer {
} }
angular.module('app.frontend').directive('panelResizer', () => new PanelResizer); angular.module('app').directive('panelResizer', () => new PanelResizer);

View File

@@ -2,7 +2,7 @@ class PermissionsModal {
constructor() { constructor() {
this.restrict = "E"; this.restrict = "E";
this.templateUrl = "frontend/directives/permissions-modal.html"; this.templateUrl = "directives/permissions-modal.html";
this.scope = { this.scope = {
show: "=", show: "=",
component: "=", component: "=",
@@ -74,4 +74,4 @@ class PermissionsModal {
} }
angular.module('app.frontend').directive('permissionsModal', () => new PermissionsModal); angular.module('app').directive('permissionsModal', () => new PermissionsModal);

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend') angular.module('app')
.filter('appDate', function ($filter) { .filter('appDate', function ($filter) {
return function (input) { return function (input) {
return input ? $filter('date')(new Date(input), 'MM/dd/yyyy', 'UTC') : ''; return input ? $filter('date')(new Date(input), 'MM/dd/yyyy', 'UTC') : '';

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend') angular.module('app')
.filter('sortBy', function ($filter) { .filter('sortBy', function ($filter) {
return function(items, sortBy) { return function(items, sortBy) {
let sortValueFn = (a, b, pinCheck = false) => { let sortValueFn = (a, b, pinCheck = false) => {

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend').filter('startFrom', function() { angular.module('app').filter('startFrom', function() {
return function(input, start) { return function(input, start) {
return input.slice(start); return input.slice(start);
}; };

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend').filter('trusted', ['$sce', function ($sce) { angular.module('app').filter('trusted', ['$sce', function ($sce) {
return function(url) { return function(url) {
return $sce.trustAsResourceUrl(url); return $sce.trustAsResourceUrl(url);
}; };

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend') angular.module('app')
.config(function ($locationProvider) { .config(function ($locationProvider) {
if(!isDesktopApplication()) { if(!isDesktopApplication()) {
@@ -11,5 +11,4 @@ angular.module('app.frontend')
} else { } else {
$locationProvider.html5Mode(false); $locationProvider.html5Mode(false);
} }
}); });

View File

@@ -241,4 +241,4 @@ class ActionsManager {
} }
angular.module('app.frontend').service('actionsManager', ActionsManager); angular.module('app').service('actionsManager', ActionsManager);

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend') angular.module('app')
.provider('authManager', function () { .provider('authManager', function () {
function domainName() { function domainName() {

View File

@@ -749,4 +749,4 @@ class ComponentManager {
} }
angular.module('app.frontend').service('componentManager', ComponentManager); angular.module('app').service('componentManager', ComponentManager);

View File

@@ -158,4 +158,4 @@ class DBManager {
} }
} }
angular.module('app.frontend').service('dbManager', DBManager); angular.module('app').service('dbManager', DBManager);

View File

@@ -108,4 +108,4 @@ class DesktopManager {
} }
angular.module('app.frontend').service('desktopManager', DesktopManager); angular.module('app').service('desktopManager', DesktopManager);

View File

@@ -77,4 +77,4 @@ class HttpManager {
} }
angular.module('app.frontend').service('httpManager', HttpManager); angular.module('app').service('httpManager', HttpManager);

View File

@@ -58,4 +58,4 @@ class MigrationManager {
} }
angular.module('app.frontend').service('migrationManager', MigrationManager); angular.module('app').service('migrationManager', MigrationManager);

View File

@@ -437,4 +437,4 @@ class ModelManager {
} }
angular.module('app.frontend').service('modelManager', ModelManager); angular.module('app').service('modelManager', ModelManager);

View File

@@ -38,4 +38,4 @@ class PackageManager {
} }
angular.module('app.frontend').service('packageManager', PackageManager); angular.module('app').service('packageManager', PackageManager);

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend') angular.module('app')
.provider('passcodeManager', function () { .provider('passcodeManager', function () {
this.$get = function($rootScope, $timeout, modelManager, dbManager, authManager, storageManager) { this.$get = function($rootScope, $timeout, modelManager, dbManager, authManager, storageManager) {

View File

@@ -147,4 +147,4 @@ class SingletonManager {
} }
angular.module('app.frontend').service('singletonManager', SingletonManager); angular.module('app').service('singletonManager', SingletonManager);

View File

@@ -228,4 +228,4 @@ StorageManager.FixedEncrypted = "FixedEncrypted"; // encrypted memoryStorage + l
StorageManager.Ephemeral = "Ephemeral"; // memoryStorage StorageManager.Ephemeral = "Ephemeral"; // memoryStorage
StorageManager.Fixed = "Fixed"; // localStorage StorageManager.Fixed = "Fixed"; // localStorage
angular.module('app.frontend').service('storageManager', StorageManager); angular.module('app').service('storageManager', StorageManager);

View File

@@ -448,4 +448,4 @@ class SyncManager {
} }
} }
angular.module('app.frontend').service('syncManager', SyncManager); angular.module('app').service('syncManager', SyncManager);

View File

@@ -80,4 +80,4 @@ class SysExtManager {
} }
angular.module('app.frontend').service('sysExtManager', SysExtManager); angular.module('app').service('sysExtManager', SysExtManager);

View File

@@ -103,4 +103,4 @@ class ThemeManager {
} }
angular.module('app.frontend').service('themeManager', ThemeManager); angular.module('app').service('themeManager', ThemeManager);

View File

@@ -1,5 +0,0 @@
//= require app/app.frontend.js
//= require_tree ./app/services
//= require app/app.frontend.js
//= require_tree ./app/frontend

View File

@@ -0,0 +1 @@
//= require_tree ./app

View File

@@ -8,5 +8,4 @@
@import "app/modals"; @import "app/modals";
@import "app/lock-screen"; @import "app/lock-screen";
@import "app/stylekit-sub"; @import "app/stylekit-sub";
@import "app/ionicons";
@import "ionicons";

View File

@@ -7,7 +7,7 @@ class ApplicationController < ActionController::Base
layout :false layout :false
def frontend def app
end end

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html ng-app="app.frontend"> <html ng-app="app">
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta content="IE=edge" http-equiv="X-UA-Compatible"/> <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
@@ -43,7 +43,7 @@
</head> </head>
<body> <body>
<div ng-controller="HomeCtrl" ng-include="'frontend/home.html'"></div> <div ng-controller="HomeCtrl" ng-include="'home.html'"></div>
</body> </body>
</html> </html>

View File

@@ -1,10 +0,0 @@
development:
adapter: redis
url: redis://localhost:6379
test:
adapter: async
production:
adapter: redis
url: redis://localhost:6379/1

View File

@@ -12,8 +12,7 @@ Rails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf)\z/
# Precompile additional assets. # Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js ) Rails.application.config.assets.precompile += %w( app.css compiled.min.js compiled.js )
Rails.application.config.assets.precompile += %w( stylekit.css app.css compiled.min.js compiled.js )
# zip library # zip library
Rails.application.config.assets.precompile += %w( zip/zip.js zip/z-worker.js zip/inflate.js zip/deflate.js ) Rails.application.config.assets.precompile += %w( zip/zip.js zip/z-worker.js zip/inflate.js zip/deflate.js )

View File

@@ -1,3 +1,3 @@
Rails.application.routes.draw do Rails.application.routes.draw do
root 'application#frontend' root 'application#app'
end end

View File

@@ -1,6 +1,6 @@
describe("app.frontend", function() { describe("app", function() {
beforeEach(module('app.frontend')); beforeEach(module('app'));
describe('Home Controller', function() { describe('Home Controller', function() {

View File

@@ -1,5 +1,5 @@
describe("date filter", function() { describe("date filter", function() {
beforeEach(module('app.frontend')); beforeEach(module('app'));
var $filter; var $filter;
beforeEach(inject(function(_$filter_){ beforeEach(inject(function(_$filter_){