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'
},
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'],
dest: 'vendor/assets/javascripts/templates.js',
options: {
module: 'app.frontend'
module: 'app'
}
}
},
@@ -70,12 +70,13 @@ module.exports = function(grunt) {
},
app: {
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/frontend/*.js',
'app/assets/javascripts/app/frontend/controllers/*.js',
'app/assets/javascripts/app/frontend/models/**/*.js',
'app/assets/javascripts/app/services/**/*.js'
'app/assets/javascripts/app/controllers/**/*.js',
'app/assets/javascripts/app/models/**/*.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',
},

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();
}
angular.module('app.frontend', [])
angular.module('app', [])
function getParameterByName(name, url) {
name = name.replace(/[\[\]]/g, "\\$&");

View File

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

View File

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

View File

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

View File

@@ -2,7 +2,7 @@ class LockScreen {
constructor() {
this.restrict = "E";
this.templateUrl = "frontend/lock-screen.html";
this.templateUrl = "lock-screen.html";
this.scope = {
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(){
return {
scope: {
@@ -7,7 +7,7 @@ angular.module('app.frontend')
tag: "="
},
templateUrl: 'frontend/notes.html',
templateUrl: 'notes.html',
replace: true,
controller: 'NotesCtrl',
controllerAs: 'ctrl',

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
angular
.module('app.frontend')
.module('app')
.directive('fileChange', function() {
return {
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) {
return {
link: function(scope, elem, attrs) {

View File

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

View File

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

View File

@@ -2,7 +2,7 @@ class AccountMenu {
constructor() {
this.restrict = "E";
this.templateUrl = "frontend/directives/account-menu.html";
this.templateUrl = "directives/account-menu.html";
this.scope = {
"onSuccessfulAuth" : "&",
"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() {
this.restrict = "E";
this.templateUrl = "frontend/directives/actions-menu.html";
this.templateUrl = "directives/actions-menu.html";
this.scope = {
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() {
this.restrict = "E";
this.templateUrl = "frontend/directives/component-modal.html";
this.templateUrl = "directives/component-modal.html";
this.scope = {
show: "=",
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) {
this.restrict = "E";
this.templateUrl = "frontend/directives/component-view.html";
this.templateUrl = "directives/component-view.html";
this.scope = {
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() {
this.restrict = "E";
this.templateUrl = "frontend/directives/editor-menu.html";
this.templateUrl = "directives/editor-menu.html";
this.scope = {
callback: "&",
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() {
this.restrict = "E";
this.templateUrl = "frontend/directives/global-extensions-menu.html";
this.templateUrl = "directives/global-extensions-menu.html";
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() {
this.restrict = "E";
this.transclude = true;
this.templateUrl = "frontend/directives/menu-row.html";
this.templateUrl = "directives/menu-row.html";
this.scope = {
circle: "=",
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() {
this.restrict = "E";
this.templateUrl = "frontend/directives/panel-resizer.html";
this.templateUrl = "directives/panel-resizer.html";
this.scope = {
index: "=",
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() {
this.restrict = "E";
this.templateUrl = "frontend/directives/permissions-modal.html";
this.templateUrl = "directives/permissions-modal.html";
this.scope = {
show: "=",
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) {
return function (input) {
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) {
return function(items, sortBy) {
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 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 $sce.trustAsResourceUrl(url);
};

View File

@@ -1,4 +1,4 @@
angular.module('app.frontend')
angular.module('app')
.config(function ($locationProvider) {
if(!isDesktopApplication()) {
@@ -11,5 +11,4 @@ angular.module('app.frontend')
} else {
$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 () {
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 () {
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.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/lock-screen";
@import "app/stylekit-sub";
@import "ionicons";
@import "app/ionicons";

View File

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

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html ng-app="app.frontend">
<html ng-app="app">
<head>
<meta charset="utf-8"/>
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
@@ -43,7 +43,7 @@
</head>
<body>
<div ng-controller="HomeCtrl" ng-include="'frontend/home.html'"></div>
<div ng-controller="HomeCtrl" ng-include="'home.html'"></div>
</body>
</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.
# 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( stylekit.css app.css compiled.min.js compiled.js )
Rails.application.config.assets.precompile += %w( app.css compiled.min.js compiled.js )
# zip library
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
root 'application#frontend'
root 'application#app'
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() {

View File

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