diff --git a/bower.json b/bower.json
index 7c38fa2..0ceb32c 100644
--- a/bower.json
+++ b/bower.json
@@ -23,7 +23,11 @@
"ng-table": "1.0.0",
"font-awesome": "fontawesome#^4.7.0",
"angular-translate-storage-local": "^2.15.1",
- "angular-translate-loader-partial": "^2.15.1"
+ "angular-translate-loader-partial": "^2.15.1",
+ "angular-bootstrap-contextmenu": "^0.9.9",
+ "ng-tags-input": "3.2.0",
+ "angular-aside": "1.2.1",
+ "bootstrap-tagsinput": "^0.8.0"
},
"devDependencies": {
"angular-mocks": "~1.5.3"
diff --git a/src/app/core/core.module.js b/src/app/core/core.module.js
index 29a3714..cffbcd5 100644
--- a/src/app/core/core.module.js
+++ b/src/app/core/core.module.js
@@ -9,10 +9,12 @@
'pascalprecht.translate',
'ngAnimate',
'ngCookies',
+ 'ngTouch',
'ngSanitize',
'ngMessages',
'ngAria',
'ngResource',
+ 'ngTagsInput',
'ui.router',
'toastr',
'ui.bootstrap',
diff --git a/src/app/core/directives/ng-right-click/ng-right-click.directive.js b/src/app/core/directives/ng-right-click/ng-right-click.directive.js
new file mode 100644
index 0000000..551bbf9
--- /dev/null
+++ b/src/app/core/directives/ng-right-click/ng-right-click.directive.js
@@ -0,0 +1,24 @@
+/**
+ * Created by george on 4/24/17.
+ */
+
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.core')
+ .directive('ngRightClick', ngRightClickFn);
+
+ /** @ngInject */
+ function ngRightClickFn($parse) {
+ return function (scope, element, attrs) {
+ var fn = $parse(attrs.ngRightClick);
+ element.bind('contextmenu', function (event) {
+ scope.$apply(function () {
+ event.preventDefault();
+ fn(scope, {$event: event});
+ });
+ });
+ };
+ }
+})();
\ No newline at end of file
diff --git a/src/app/core/directives/om-aside/om-aside.directive.js b/src/app/core/directives/om-aside/om-aside.directive.js
new file mode 100644
index 0000000..0b6b0b2
--- /dev/null
+++ b/src/app/core/directives/om-aside/om-aside.directive.js
@@ -0,0 +1,64 @@
+/**
+ * Created by george on 5/2/17.
+ */
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.core')
+ .controller('omAsideController', omAsideControllerFn)
+ .factory('omAside', omAsideFactoryFn)
+ .directive('omAside', omAsideFn);
+
+ /** @ngInject */
+ function omAsideControllerFn() {
+
+ // Data
+
+ // Methods
+
+ init();
+ function init() {
+
+ }
+ }
+
+ function omAsideFactoryFn() {
+ var asideConfig = {};
+ return {
+ open: open,
+ close: close,
+ toggle: toggle,
+ setAside: setAside
+ };
+
+ function open(id) {
+ asideConfig[id] != undefined ? angular.element("#" + id).removeClass('nav-closed-' + asideConfig[id].direction) : angular.element("#" + id).removeClass('nav-closed');
+ }
+
+ function close(id) {
+ asideConfig[id] != undefined ? angular.element("#" + id).addClass('nav-closed-' + asideConfig[id].direction) : angular.element("#" + id).addClass('nav-closed');
+ }
+
+ function toggle(id) {
+ asideConfig[id] != undefined ? angular.element("#" + id).toggleClass('nav-closed-' + asideConfig[id].direction) : angular.element("#" + id).toggleClass('nav-closed');
+ }
+
+ function setAside(id, config) {
+ asideConfig[id] = config;
+ config.direction != undefined ? angular.element("#" + id).addClass('nav-closed-' + config.direction) : angular.element("#" + id).addClass('nav-closed');
+ }
+ }
+
+ function omAsideFn(omAside) {
+ return {
+ restrict: 'A',
+ scope: {
+ direction: '@omSlideDirection'
+ },
+ link: function(scope, el){
+ omAside.setAside(el.attr('id'), {direction: scope.direction});
+ }
+ };
+ }
+})();
\ No newline at end of file
diff --git a/src/app/core/directives/om-tagsinput/om-tagsinput.directive.js b/src/app/core/directives/om-tagsinput/om-tagsinput.directive.js
new file mode 100644
index 0000000..ba2a082
--- /dev/null
+++ b/src/app/core/directives/om-tagsinput/om-tagsinput.directive.js
@@ -0,0 +1,33 @@
+/**
+ * Created by george on 4/28/17.
+ */
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.core')
+ .directive('omTagsinput', omTagsinputFn);
+
+ /** @ngInject */
+ function omTagsinputFn() {
+ return {
+ restrict: 'A',
+ scope: {
+ 'ngModel': '='
+ },
+ link: function(scope, elem) {
+ var $el = $(elem);
+ $el
+ .val(scope.ngModel.join(","))
+ .tagsinput("items");
+
+
+ scope.$watch('ngModel', function() {
+ if (angular.isString(scope.ngModel)){
+ scope.ngModel = scope.ngModel.split(",");
+ }
+ });
+ }
+ };
+ }
+})();
\ No newline at end of file
diff --git a/src/app/core/filters/filesize.filter.js b/src/app/core/filters/filesize.filter.js
new file mode 100644
index 0000000..0972539
--- /dev/null
+++ b/src/app/core/filters/filesize.filter.js
@@ -0,0 +1,21 @@
+/**
+ * Created by george on 4/21/17.
+ */
+
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.core')
+ .filter('bytes', bytesFn);
+
+ function bytesFn() {
+ return function(bytes, precision) {
+ if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-';
+ if (typeof precision === 'undefined') precision = 1;
+ var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'],
+ number = Math.floor(Math.log(bytes) / Math.log(1024));
+ return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number];
+ }
+ }
+})();
\ No newline at end of file
diff --git a/src/app/core/filters/trim.filter.js b/src/app/core/filters/trim.filter.js
index f1aa71d..fd79b22 100644
--- a/src/app/core/filters/trim.filter.js
+++ b/src/app/core/filters/trim.filter.js
@@ -6,13 +6,14 @@
angular
.module('app.core')
- .filter('trim', function () {
- return function (value) {
- if (!angular.isString(value)) {
- return value;
- }
- return value.replace(/^\s+|\s+$/g, ''); // you could use .trim, but it's not going to work in IE<9
- };
- });
+ .filter('trim', trimFn);
+ function trimFn() {
+ return function (value) {
+ if (!angular.isString(value)) {
+ return value;
+ }
+ return value.replace(/^\s+|\s+$/g, ''); // you could use .trim, but it's not going to work in IE<9
+ };
+ }
})();
diff --git a/src/app/core/filters/typeToIcon.filter.js b/src/app/core/filters/typeToIcon.filter.js
new file mode 100644
index 0000000..3aaf531
--- /dev/null
+++ b/src/app/core/filters/typeToIcon.filter.js
@@ -0,0 +1,37 @@
+/**
+ * Created by george on 4/20/17.
+ */
+
+(function () {
+ 'use strict';
+ angular
+ .module('app.core')
+ .filter('typeToIcon', typeToIcon);
+
+ /** @ngInject */
+ function typeToIcon() {
+ var map = {
+ 'Folder': 'folder-open',
+ 'Image': 'file-image-o',
+ 'Word': 'file-word-o',
+ 'Excel': 'file-excel-o',
+ 'Pdf': 'file-pdf-o',
+ 'Power Point': 'file-powerpoint-o',
+ 'Video': 'file-video-o',
+ 'Audio': 'file-audio-o',
+ 'Javascript': 'NOTDEFINED',
+ 'HTML': 'html5',
+ 'Css': 'css3',
+ 'C#': 'NOTDEFINED',
+ 'XML': 'NOTDEFINED',
+ 'Code': 'file-code-o',
+ 'Archive': 'file-archive-o',
+ 'Other': 'file-o',
+ 'Document': 'file-text-o'
+ };
+ return function (type) {
+ return map[type];
+ }
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/core/less/tags-input.less b/src/app/core/less/tags-input.less
new file mode 100644
index 0000000..c42f53b
--- /dev/null
+++ b/src/app/core/less/tags-input.less
@@ -0,0 +1,51 @@
+/*Author : @arboshiki*/
+
+.bootstrap-tagsinput{
+ display: block;
+ width: 100%;
+ border-radius: 0;
+ margin-bottom: 0;
+ padding: @tags-input-padding-vertical @tags-input-padding-horizontal;
+ min-height: @tags-input-min-height;
+ border-width: @tags-input-border-width;
+ .tag{
+ position: relative;
+ border-radius: 0;
+ display: inline-block;
+ margin-top: @tags-input-tag-margin-vertical;
+ margin-bottom: @tags-input-tag-margin-vertical;
+ padding: @tags-input-tag-padding;
+ font-size: @tags-input-font-size;
+ [data-role=remove]{
+ display: block;
+ position: absolute;
+ top: 0;
+ right: 0;
+ height: 100%;
+ width: @tags-input-tag-close-width;
+ line-height: @tags-input-min-height - 2 * @tags-input-border-width - 2 * @tags-input-padding-vertical - 2 * @tags-input-tag-margin-vertical;
+ .transition(background-color @transition-duration);
+ &:after{
+ content: @fa-var-times-circle;
+ font-family: fontAwesome;
+ padding: 2px 1px;
+ font-size: @tags-input-tag-close-font-size;
+ text-align: center;
+ }
+ &:hover{
+ background-color: rgba(0, 0, 0, 0.4);
+ }
+ }
+ }
+ &:focus{
+ border-color: red;
+ }
+ input{
+ &,
+ &:hover,
+ &:focus{
+ border-color: transparent;
+ background-color: transparent;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/i18n/en.json b/src/app/i18n/en.json
index d03ac6a..d5abb28 100644
--- a/src/app/i18n/en.json
+++ b/src/app/i18n/en.json
@@ -1,6 +1,8 @@
{
"APP": {
"GLOBAL":{
+ "MONTHS": "months",
+ "MONTH": "month",
"DAY": "day",
"DAYS": "days",
"HR": "hr",
diff --git a/src/app/i18n/ka.json b/src/app/i18n/ka.json
index d2d6407..a56d716 100644
--- a/src/app/i18n/ka.json
+++ b/src/app/i18n/ka.json
@@ -1,6 +1,8 @@
{
"APP": {
"GLOBAL":{
+ "MONTHS": "თვის",
+ "MONTH": "თვის",
"DAY": "დღის",
"DAYS": "დღის",
"HR": "სთ",
diff --git a/src/app/index.module.js b/src/app/index.module.js
index 5ded1da..6287ecc 100644
--- a/src/app/index.module.js
+++ b/src/app/index.module.js
@@ -3,23 +3,14 @@
angular
.module('angularLobiadmin', [
- 'ngAnimate',
- 'ngCookies',
- 'ngTouch',
- 'ngSanitize',
- 'ngMessages',
- 'ngAria',
- 'ngResource',
- 'ui.router',
- 'ui.bootstrap',
- 'toastr',
- 'pascalprecht.translate',
+ 'ui.bootstrap.contextMenu',
'app.core',
'app.pages',
- 'app.dashboard'
+ 'app.dashboard',
+ 'app.fileManager'
]);
})();
diff --git a/src/app/main/apps/file-manager/data/myFiles.json b/src/app/main/apps/file-manager/data/myFiles.json
new file mode 100644
index 0000000..b4db836
--- /dev/null
+++ b/src/app/main/apps/file-manager/data/myFiles.json
@@ -0,0 +1,386 @@
+{
+ "fileList": [
+ {
+ "id": 0,
+ "icon": "",
+ "name": "New Folder",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323623006
+ },
+ {
+ "id": 1,
+ "icon": "",
+ "name": "solar-center-stanford.gif",
+ "type": "Image",
+ "thumb": "http://solar-center.stanford.edu/latestimg/latest_eit_171_thumbnail.gif",
+ "preview": "http://solar-center.stanford.edu/latestimg/latest_eit_171_thumbnail.gif",
+ "owner": "Public",
+ "size": 2332300,
+ "tags": [],
+ "date": 1288323323006
+ },
+ {
+ "id": 2,
+ "icon": "",
+ "name": "Nature.docx",
+ "type": "Word",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 233300,
+ "tags": [],
+ "date": 1288323623306
+ },
+ {
+ "id": 3,
+ "icon": "",
+ "name": "Marketing.xls",
+ "type": "Excel",
+ "thumb": "",
+ "preview": "",
+ "owner": "Me",
+ "size": 23323,
+ "tags": [],
+ "date": 1288343623006
+ },
+ {
+ "id": 4,
+ "icon": "",
+ "name": "Famous Museums.pptx",
+ "type": "Power Point",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 13623006,
+ "tags": [],
+ "date": 1288313623006
+ },
+ {
+ "id": 5,
+ "icon": "",
+ "name": "Birthday.mp4",
+ "type": "Video",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 13623006,
+ "tags": [],
+ "date": 1288323673006
+ },
+ {
+ "id": 6,
+ "icon": "",
+ "name": "We Rock (Official audio).mp3",
+ "type": "Audio",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 2883936,
+ "tags": [],
+ "date": 1288393623006
+ },
+ {
+ "id": 7,
+ "icon": "",
+ "name": "MUSIC",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 87236,
+ "tags": [],
+ "date": 1288723623006
+ },
+ {
+ "id": 8,
+ "icon": "",
+ "name": "fm-styles.css",
+ "type": "Css",
+ "thumb": "",
+ "preview": "",
+ "owner": "Me",
+ "size": 28832,
+ "tags": [
+ "family"
+ ],
+ "date": 1288323645006
+ },
+ {
+ "id": 9,
+ "icon": "",
+ "name": "solar-system.cs",
+ "type": "Code",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 23673,
+ "tags": [
+ "family"
+ ],
+ "date": 1288323673006
+ },
+ {
+ "id": 10,
+ "icon": "",
+ "name": "Windows-7_x64.zip",
+ "type": "Archive",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 288323722,
+ "tags": [
+ "favourites"
+ ],
+ "date": 1288323723006
+ },
+ {
+ "id": 11,
+ "icon": "",
+ "name": "log-file-b772.log",
+ "type": "Other",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 83236230,
+ "tags": [
+ "favourites"
+ ],
+ "date": 1288323623044
+ },
+ {
+ "id": 12,
+ "icon": "",
+ "name": "salaries.doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 28838362,
+ "tags": [],
+ "date": 1288383623006
+ },
+ {
+ "id": 13,
+ "icon": "",
+ "name": "salaries(1).doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 88736,
+ "tags": [],
+ "date": 1288873623006
+ },
+ {
+ "id": 14,
+ "icon": "",
+ "name": "GAMES",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323623006
+ },
+ {
+ "id": 15,
+ "icon": "",
+ "name": "avatar-user.png",
+ "type": "Image",
+ "thumb": "https://www.w3schools.com/w3css/img_avatar3.png",
+ "preview": "",
+ "owner": "Public",
+ "size": 2332300,
+ "tags": [],
+ "date": 1288323323006
+ },
+ {
+ "id": 16,
+ "icon": "",
+ "name": "Essay.docx",
+ "type": "Word",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 233300,
+ "tags": [],
+ "date": 1288323623306
+ },
+ {
+ "id": 17,
+ "icon": "",
+ "name": "Financical-research.xls",
+ "type": "Excel",
+ "thumb": "",
+ "preview": "",
+ "owner": "Me",
+ "size": 23323,
+ "tags": [],
+ "date": 1288343623006
+ },
+ {
+ "id": 18,
+ "icon": "",
+ "name": "Planet Earth.pptx",
+ "type": "Power Point",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 13623006,
+ "tags": [],
+ "date": 1288313623006
+ },
+ {
+ "id": 19,
+ "icon": "",
+ "name": "Kung Fu Panda (ENG).mp4",
+ "type": "Video",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 13623006,
+ "tags": [],
+ "date": 1288323673006
+ },
+ {
+ "id": 20,
+ "icon": "",
+ "name": "Nokia Ringtone.mp3",
+ "type": "Audio",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 2883936,
+ "tags": [],
+ "date": 1288393623006
+ },
+ {
+ "id": 21,
+ "icon": "",
+ "name": "PRIVATE",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 87236,
+ "tags": [],
+ "date": 1288723623006
+ },
+ {
+ "id": 22,
+ "icon": "",
+ "name": "fm-styles(1).css",
+ "type": "Css",
+ "thumb": "",
+ "preview": "",
+ "owner": "Me",
+ "size": 28832,
+ "tags": [],
+ "date": 1288323645006
+ },
+ {
+ "id": 23,
+ "icon": "",
+ "name": "Problem-312.cs",
+ "type": "Code",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 23673,
+ "tags": [],
+ "date": 1288323673006
+ },
+ {
+ "id": 24,
+ "icon": "",
+ "name": "Windows-7_x86.zip",
+ "type": "Archive",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 2883237,
+ "tags": [],
+ "date": 1288323723006
+ },
+ {
+ "id": 25,
+ "icon": "",
+ "name": "another-log.lgg",
+ "type": "Other",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 83236230,
+ "tags": [],
+ "date": 1288323623044
+ },
+ {
+ "id": 26,
+ "icon": "",
+ "name": "Examination Answers Databases.doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 28838362,
+ "tags": [],
+ "date": 1288383623006
+ },
+ {
+ "id": 27,
+ "icon": "",
+ "name": "Examination Answers Web.doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 88736,
+ "tags": [],
+ "date": 1288873623006
+ },
+ {
+ "id": 28,
+ "icon": "",
+ "name": "fa-fa-image.fa",
+ "type": "Image",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 88736,
+ "tags": [],
+ "date": 1288873623006
+ }
+ ],
+ "breadcrumbs": [
+ {
+ "id": 10001,
+ "icon": "",
+ "name": "My Files",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323623006
+ },
+ {
+ "id": 10002,
+ "icon": "",
+ "name": "Documents",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323323006
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/data/offlineFiles.json b/src/app/main/apps/file-manager/data/offlineFiles.json
new file mode 100644
index 0000000..bdc82d2
--- /dev/null
+++ b/src/app/main/apps/file-manager/data/offlineFiles.json
@@ -0,0 +1,114 @@
+{
+ "fileList": [
+ {
+ "id": 0,
+ "icon": "",
+ "name": "New Folder",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323623006
+ },
+ {
+ "id": 1,
+ "icon": "",
+ "name": "solar-center-stanford.gif",
+ "type": "Image",
+ "thumb": "http://solar-center.stanford.edu/latestimg/latest_eit_171_thumbnail.gif",
+ "preview": "http://solar-center.stanford.edu/latestimg/latest_eit_171_thumbnail.gif",
+ "owner": "Public",
+ "size": 2332300,
+ "tags": [],
+ "date": 1288323323006
+ },
+ {
+ "id": 2,
+ "icon": "",
+ "name": "Nature.docx",
+ "type": "Word",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 233300,
+ "tags": [],
+ "date": 1288323623306
+ },
+ {
+ "id": 3,
+ "icon": "",
+ "name": "Marketing.xls",
+ "type": "Excel",
+ "thumb": "",
+ "preview": "",
+ "owner": "Me",
+ "size": 23323,
+ "tags": [],
+ "date": 1288343623006
+ },
+ {
+ "id": 4,
+ "icon": "",
+ "name": "Famous Museums.pptx",
+ "type": "Power Point",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 13623006,
+ "tags": [],
+ "date": 1288313623006
+ },
+ {
+ "id": 5,
+ "icon": "",
+ "name": "Birthday.mp4",
+ "type": "Video",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 13623006,
+ "tags": [],
+ "date": 1288323673006
+ },
+ {
+ "id": 6,
+ "icon": "",
+ "name": "We Rock (Official audio).mp3",
+ "type": "Audio",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 2883936,
+ "tags": [],
+ "date": 1288393623006
+ }
+ ],
+ "breadcrumbs": [
+ {
+ "id": 10001,
+ "icon": "",
+ "name": "Offline Files",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323623006
+ },
+ {
+ "id": 10002,
+ "icon": "",
+ "name": "Documents",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323323006
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/data/recentFiles.json b/src/app/main/apps/file-manager/data/recentFiles.json
new file mode 100644
index 0000000..80a97a3
--- /dev/null
+++ b/src/app/main/apps/file-manager/data/recentFiles.json
@@ -0,0 +1,78 @@
+{
+ "fileList": [
+ {
+ "id": 0,
+ "icon": "",
+ "name": "another-log.lgg",
+ "type": "Other",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 83236230,
+ "tags": [],
+ "date": 1288323623044
+ },
+ {
+ "id": 1,
+ "icon": "",
+ "name": "Examination Answers Databases.doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 28838362,
+ "tags": [],
+ "date": 1288383623006
+ },
+ {
+ "id": 2,
+ "icon": "",
+ "name": "Examination Answers Web.doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 88736,
+ "tags": [],
+ "date": 1288873623006
+ },
+ {
+ "id": 3,
+ "icon": "",
+ "name": "fa-fa-image.fa",
+ "type": "Image",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 88736,
+ "tags": [],
+ "date": 1288873623006
+ }
+ ],
+ "breadcrumbs": [
+ {
+ "id": 10001,
+ "icon": "",
+ "name": "Recent",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323623006
+ },
+ {
+ "id": 10002,
+ "icon": "",
+ "name": "Documents",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323323006
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/data/sharedFiles.json b/src/app/main/apps/file-manager/data/sharedFiles.json
new file mode 100644
index 0000000..a6b0241
--- /dev/null
+++ b/src/app/main/apps/file-manager/data/sharedFiles.json
@@ -0,0 +1,140 @@
+{
+ "fileList": [
+ {
+ "id": 0,
+ "icon": "",
+ "name": "MUSIC",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 87236,
+ "tags": [],
+ "date": 1288723623006
+ },
+ {
+ "id": 1,
+ "icon": "",
+ "name": "solar-system.cs",
+ "type": "Code",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 23673,
+ "tags": [
+ "family"
+ ],
+ "date": 1288323673006
+ },
+ {
+ "id": 2,
+ "icon": "",
+ "name": "salaries.doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 28838362,
+ "tags": [],
+ "date": 1288383623006
+ },
+ {
+ "id": 3,
+ "icon": "",
+ "name": "salaries(1).doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 88736,
+ "tags": [],
+ "date": 1288873623006
+ },
+ {
+ "id": 4,
+ "icon": "",
+ "name": "PRIVATE",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 87236,
+ "tags": [],
+ "date": 1288723623006
+ },
+ {
+ "id": 5,
+ "icon": "",
+ "name": "Problem-312.cs",
+ "type": "Code",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 23673,
+ "tags": [],
+ "date": 1288323673006
+ },
+ {
+ "id": 6,
+ "icon": "",
+ "name": "Examination Answers Databases.doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 28838362,
+ "tags": [],
+ "date": 1288383623006
+ },
+ {
+ "id": 7,
+ "icon": "",
+ "name": "Examination Answers Web.doc",
+ "type": "Document",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 88736,
+ "tags": [],
+ "date": 1288873623006
+ },
+ {
+ "id": 8,
+ "icon": "",
+ "name": "fa-fa-image.fa",
+ "type": "Image",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 88736,
+ "tags": [],
+ "date": 1288873623006
+ }
+ ],
+ "breadcrumbs": [
+ {
+ "id": 10001,
+ "icon": "",
+ "name": "Shared with me",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323623006
+ },
+ {
+ "id": 10002,
+ "icon": "",
+ "name": "Documents",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323323006
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/data/starredFiles.json b/src/app/main/apps/file-manager/data/starredFiles.json
new file mode 100644
index 0000000..244161e
--- /dev/null
+++ b/src/app/main/apps/file-manager/data/starredFiles.json
@@ -0,0 +1,86 @@
+{
+ "fileList": [
+ {
+ "id": 0,
+ "icon": "",
+ "name": "fm-styles.css",
+ "type": "Css",
+ "thumb": "",
+ "preview": "",
+ "owner": "Me",
+ "size": 28832,
+ "tags": [
+ "family"
+ ],
+ "date": 1288323645006
+ },
+ {
+ "id": 1,
+ "icon": "",
+ "name": "solar-system.cs",
+ "type": "Code",
+ "thumb": "",
+ "preview": "",
+ "owner": "Emily Bennet",
+ "size": 23673,
+ "tags": [
+ "family"
+ ],
+ "date": 1288323673006
+ },
+ {
+ "id": 2,
+ "icon": "",
+ "name": "Windows-7_x64.zip",
+ "type": "Archive",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 288323722,
+ "tags": [
+ "favourites"
+ ],
+ "date": 1288323723006
+ },
+ {
+ "id": 3,
+ "icon": "",
+ "name": "log-file-b772.log",
+ "type": "Other",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": 83236230,
+ "tags": [
+ "favourites"
+ ],
+ "date": 1288323623044
+ }
+ ],
+ "breadcrumbs": [
+ {
+ "id": 10001,
+ "icon": "",
+ "name": "Starred",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323623006
+ },
+ {
+ "id": 10002,
+ "icon": "",
+ "name": "Documents",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": 1288323323006
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/dialogs/create-rename-dialog/create-rename-dialog.controller.js b/src/app/main/apps/file-manager/dialogs/create-rename-dialog/create-rename-dialog.controller.js
new file mode 100644
index 0000000..d2f37bc
--- /dev/null
+++ b/src/app/main/apps/file-manager/dialogs/create-rename-dialog/create-rename-dialog.controller.js
@@ -0,0 +1,43 @@
+/**
+ * Created by george on 4/26/17.
+ */
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.fileManager')
+ .controller('CreateRenameDialogController', CreateRenameDialogControllerFn);
+
+ /** @ngInject */
+ function CreateRenameDialogControllerFn($uibModalInstance, CurrentEntry, FileId) {
+ var vm = this;
+ // variables
+ vm.isRename = CurrentEntry != null;
+ vm.currentEntry = CurrentEntry || {
+ "id": FileId,
+ "icon": "",
+ "name": "",
+ "type": "Folder",
+ "thumb": "",
+ "preview": "",
+ "owner": "Public",
+ "size": "",
+ "tags": [],
+ "date": new Date()
+ };
+
+ // Methods
+ vm.ok = ok;
+ vm.cancel = cancel;
+
+
+ function ok() {
+ console.log(vm.currentEntry);
+ $uibModalInstance.close(vm.currentEntry);
+ }
+
+ function cancel() {
+ $uibModalInstance.dismiss('cancel');
+ }
+ }
+})();
diff --git a/src/app/main/apps/file-manager/dialogs/create-rename-dialog/create-rename-dialog.html b/src/app/main/apps/file-manager/dialogs/create-rename-dialog/create-rename-dialog.html
new file mode 100644
index 0000000..db868c2
--- /dev/null
+++ b/src/app/main/apps/file-manager/dialogs/create-rename-dialog/create-rename-dialog.html
@@ -0,0 +1,16 @@
+
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/dialogs/delete-dialog/delete-dialog.controller.js b/src/app/main/apps/file-manager/dialogs/delete-dialog/delete-dialog.controller.js
new file mode 100644
index 0000000..0c796c3
--- /dev/null
+++ b/src/app/main/apps/file-manager/dialogs/delete-dialog/delete-dialog.controller.js
@@ -0,0 +1,29 @@
+/**
+ * Created by george on 5/4/17.
+ */
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.fileManager')
+ .controller('DeleteDialogController', DeleteDialogControllerFn);
+
+ /** @ngInject */
+ function DeleteDialogControllerFn($uibModalInstance, CurrentEntry) {
+ var vm = this;
+ // variables
+ vm.currentEntry = CurrentEntry;
+ // Methods
+ vm.ok = ok;
+ vm.cancel = cancel;
+
+
+ function ok() {
+ $uibModalInstance.close(CurrentEntry);
+ }
+
+ function cancel() {
+ $uibModalInstance.dismiss('cancel');
+ }
+ }
+})();
diff --git a/src/app/main/apps/file-manager/dialogs/delete-dialog/delete-dialog.html b/src/app/main/apps/file-manager/dialogs/delete-dialog/delete-dialog.html
new file mode 100644
index 0000000..df68bc3
--- /dev/null
+++ b/src/app/main/apps/file-manager/dialogs/delete-dialog/delete-dialog.html
@@ -0,0 +1,16 @@
+
+
+
+
Delete {{vm.currentEntry.name}} ?
+
size : {{vm.currentEntry.size | bytes}}
+
last modified : {{vm.currentEntry.date | date:'HH:mm, dd/MM/yyyy'}}
+
+
+
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/dialogs/manage-tags-dialog/manage-tags-dialog.controller.js b/src/app/main/apps/file-manager/dialogs/manage-tags-dialog/manage-tags-dialog.controller.js
new file mode 100644
index 0000000..a7d7436
--- /dev/null
+++ b/src/app/main/apps/file-manager/dialogs/manage-tags-dialog/manage-tags-dialog.controller.js
@@ -0,0 +1,32 @@
+/**
+ * Created by george on 4/27/17.
+ */
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.fileManager')
+ .controller('ManageTagsController', ManageTagsControllerFn);
+
+ /** @ngInject */
+ function ManageTagsControllerFn($uibModalInstance, CurrentTags) {
+ var vm = this;
+
+ // variables
+ vm.currentTags = CurrentTags || [];
+
+ // Methods
+ vm.ok = ok;
+ vm.cancel = cancel;
+
+
+ function ok(){
+ console.log(vm.currentTags);
+ $uibModalInstance.close(vm.currentTags);
+ }
+
+ function cancel(){
+ $uibModalInstance.dismiss('cancel');
+ }
+ }
+})();
diff --git a/src/app/main/apps/file-manager/dialogs/manage-tags-dialog/manage-tags-dialog.html b/src/app/main/apps/file-manager/dialogs/manage-tags-dialog/manage-tags-dialog.html
new file mode 100644
index 0000000..483be36
--- /dev/null
+++ b/src/app/main/apps/file-manager/dialogs/manage-tags-dialog/manage-tags-dialog.html
@@ -0,0 +1,15 @@
+
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/dialogs/preview-file/preview-file.controller.js b/src/app/main/apps/file-manager/dialogs/preview-file/preview-file.controller.js
new file mode 100644
index 0000000..c5cc8da
--- /dev/null
+++ b/src/app/main/apps/file-manager/dialogs/preview-file/preview-file.controller.js
@@ -0,0 +1,31 @@
+/**
+ * Created by george on 4/27/17.
+ */
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.fileManager')
+ .controller('PreviewFileController', PreviewFileControllerFn);
+
+ /** @ngInject */
+ function PreviewFileControllerFn($uibModalInstance, CurrentEntry) {
+ var vm = this;
+
+ // variables
+ vm.currentEntry = CurrentEntry;
+
+ vm.fileName = vm.currentEntry.name;
+ vm.previewLink = vm.currentEntry.preview;
+ vm.thumbLink = vm.currentEntry.thumb;
+ vm.fileType = vm.currentEntry.type;
+
+ // Methods
+ vm.ok = ok;
+
+
+ function ok(){
+ $uibModalInstance.close();
+ }
+ }
+})();
diff --git a/src/app/main/apps/file-manager/dialogs/preview-file/preview-file.html b/src/app/main/apps/file-manager/dialogs/preview-file/preview-file.html
new file mode 100644
index 0000000..5acdf94
--- /dev/null
+++ b/src/app/main/apps/file-manager/dialogs/preview-file/preview-file.html
@@ -0,0 +1,14 @@
+
+
+
+

+
Thumbnail Preview ! (no preview link provided)
+

+
Icon Preview ! (no preview and thumbnail link provided)
+
+
+
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/file-manager.controller.js b/src/app/main/apps/file-manager/file-manager.controller.js
new file mode 100644
index 0000000..cfa11d0
--- /dev/null
+++ b/src/app/main/apps/file-manager/file-manager.controller.js
@@ -0,0 +1,337 @@
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.fileManager')
+ .controller('FileManagerController', FileManagerControllerFn);
+
+ /** @ngInject */
+ function FileManagerControllerFn($rootScope, $translate, $uibModal, omAside, myFiles, starredFiles, sharedFiles, recentFiles, offlineFiles) {
+ var vm = this;
+
+ vm.myFiles = myFiles;
+ vm.starredFiles = starredFiles;
+ vm.sharedFiles = sharedFiles;
+ vm.recentFiles = recentFiles;
+ vm.offlineFiles = offlineFiles;
+
+ vm.files = myFiles.fileList;
+ vm.breadcrumbs = myFiles.breadcrumbs;
+
+ vm.selectedFile = null;
+
+ vm.currentView = 'list-condensed';
+ vm.orderByField = 'name';
+ vm.defaultSort = true;
+ vm.filterBy = "";
+
+ vm.menuOptions = [];
+
+ vm.searchValue = "";
+ vm.searchResults = [];
+ vm.toggleSearch = false;
+
+ vm.canPreview = ["Image", "Video", "Audio"];
+ vm.users = [{"name": "John Doe", "email": "JohnDoe@example.com"}, {
+ "name": "Jane Doe",
+ "email": "JaneDoe@examle.com"
+ }, {"name": "user name", "email": "userEmail@example.com"}];
+ vm.currentUser = vm.users[0];
+
+ // Methods
+ // --File Directory
+ vm.switchDirectory = switchDirectory;
+ // --File Selections
+ vm.selectFile = selectFile;
+ vm.resetSelection = resetSelection;
+ vm.isAvailableForPreview = isAvailableForPreview;
+ // --File Display
+ vm.toggleView = toggleView;
+ // --File Type Check
+ vm.checkFileType = checkFileType;
+ // --Upload Buttons
+ vm.chooseFiles = chooseFiles;
+ vm.chooseFolder = chooseFolder;
+ // --Search
+ vm.searchFn = searchFn;
+ vm.clearSearchResultsFn = clearSearchResultsFn;
+ // --Create/Rename Folder Modal
+ vm.showCreateFolderDialog = showCreateFolderDialog;
+ vm.showRenameFolderDialog = showRenameFolderDialog;
+ // --Manage Tags Modal
+ vm.showManageTagsDialog = showManageTagsDialog;
+ vm.filterListByTag = filterListByTag;
+ // --Preview File Modal
+ vm.showPreviewFileDialog = showPreviewFileDialog;
+ // --Delete Modal
+ vm.showDeleteDialog = showDeleteDialog;
+ // --Side Menu
+ vm.toggleFileManagerAside = toggleFileManagerAside;
+ // --Breadcrumbs click
+ vm.changeDirectory = changeDirectory;
+
+ /////////////////////////
+
+ translateMenu();
+ init();
+
+ function init() {
+ $rootScope.$on('App:languageChange', function () {
+ translateMenu();
+ });
+ }
+
+ function translateMenu() {
+
+ $translate(['FILE_MANAGER.MENU.OPEN', 'FILE_MANAGER.MENU.SHARE', 'FILE_MANAGER.MENU.MANAGE_TAGS', 'FILE_MANAGER.MENU.CUT',
+ 'FILE_MANAGER.MENU.RENAME', 'FILE_MANAGER.MENU.DELETE', 'FILE_MANAGER.MENU.VIEW',
+ 'FILE_MANAGER.MENU.DOWNLOAD']).then(function (translations) {
+ vm.AllMenuOptions = {
+ /*
+ ['Menu item name', function ($itemScope, $event, modelValue, text, $li) {
+ vm.selected = $itemScope.item.name;
+ }]
+ */
+ "open": [" " + translations['FILE_MANAGER.MENU.OPEN'], openFn],
+ "view": [" " + translations['FILE_MANAGER.MENU.VIEW'], viewFn],
+ "download": [" " + translations['FILE_MANAGER.MENU.DOWNLOAD'], downloadFn],
+ "share": [" " + translations['FILE_MANAGER.MENU.SHARE'], shareFn],
+ "tags": [" " + translations['FILE_MANAGER.MENU.MANAGE_TAGS'], manageTagsFn],
+ "cut": [" " + translations['FILE_MANAGER.MENU.CUT'], cutFn],
+ "rename": [" " + translations['FILE_MANAGER.MENU.RENAME'], renameFn],
+ "null": null, // Divider
+ "delete": [" " + translations['FILE_MANAGER.MENU.DELETE'], deleteFn]
+ };
+ });
+ }
+
+ function toggleView() {
+ if (vm.currentView === 'list-condensed') {
+ vm.currentView = 'grid-view';
+ } else if (vm.currentView === 'grid-view') {
+ vm.currentView = 'list-condensed';
+ }
+ }
+
+ function selectFile(x) {
+ vm.selectedFile = x;
+ }
+
+ function resetSelection() {
+ vm.selectedFile = null;
+ }
+
+ function isAvailableForPreview(file) {
+ if (vm.canPreview.indexOf(file.type) != -1 && (file.preview != "" || file.thumb != "")) {
+ return true;
+ } else
+ return false;
+ }
+
+ function chooseFiles(input) {
+ console.log(input.files);
+ }
+
+ function chooseFolder(input) {
+ console.log(input.files);
+ }
+
+ function checkFileType($itemScope) {
+ vm.menuOptions = [];
+ vm.menuOptionsClone = angular.copy(vm.AllMenuOptions);
+ angular.forEach(vm.menuOptionsClone, function(value, key){
+ if (vm.selectedFile.type === 'Folder' && !(key === 'view' || key === 'download')){
+ vm.menuOptions.push(value);
+ }else if(!(vm.selectedFile.type === 'Folder') && vm.isAvailableForPreview($itemScope) && !(key === 'open')){
+ vm.menuOptions.push(value);
+ }else if(!(vm.selectedFile.type === 'Folder') && !vm.isAvailableForPreview($itemScope) && !(key === 'open' || key === 'view')){
+ vm.menuOptions.push(value);
+ }
+ });
+ }
+
+ function openFn($itemScope) {
+ console.log("Open Selected File" + "\nfileID: " + $itemScope.file.id);
+ console.log($itemScope.file);
+ vm.selectedFile = $itemScope.file;
+ }
+
+ function shareFn($itemScope) {
+ console.log("Share Selected File" + "\nfileID: " + $itemScope.file.id);
+ console.log($itemScope.file);
+ vm.selectedFile = $itemScope.file;
+ }
+
+ function manageTagsFn($itemScope) {
+ vm.selectedFile = $itemScope.file;
+ vm.showManageTagsDialog(vm.selectedFile);
+
+ }
+
+ function filterListByTag(tag) {
+ if (tag != null) {
+ vm.filterBy = tag;
+ angular.element("#filteredBy").css("display","inline-block");
+ }else {
+ vm.filterBy = "";
+ angular.element("#filteredBy").css("display","none");
+ }
+ }
+
+ function cutFn($itemScope) {
+ console.log("Cut Selected File" + "\nfileID: " + $itemScope.file.id);
+ console.log($itemScope.file);
+ vm.selectedFile = $itemScope.file;
+ }
+
+ function renameFn($itemScope) {
+ vm.selectedFile = $itemScope.file;
+ vm.showRenameFolderDialog(vm.selectedFile);
+ }
+
+ function deleteFn($itemScope) {
+ vm.selectedFile = $itemScope.file;
+ vm.showDeleteDialog(vm.selectedFile);
+ }
+
+ function viewFn($itemScope) {
+ vm.selectedFile = $itemScope.file;
+ vm.showPreviewFileDialog(vm.selectedFile);
+ }
+
+ function downloadFn($itemScope) {
+ console.log("Download Selected File" + "\nfileID: " + $itemScope.file.id);
+ console.log($itemScope.file);
+ vm.selectedFile = $itemScope.file;
+ }
+
+ function searchFn(searchValue) {
+ vm.searchResults = [];
+ if (searchValue != "") {
+ for (var i = 0; i < vm.files.length; i++) {
+ if (vm.files[i].name.indexOf(searchValue) != -1) {
+ vm.searchResults.push({
+ id: vm.files[i].id, icon: vm.files[i].icon, name: vm.files[i].name, type: vm.files[i].type,
+ owner: vm.files[i].owner, size: vm.files[i].size, date: vm.files[i].date
+ });
+ }
+ }
+ console.log(vm.searchResults);
+ }
+ }
+
+ function clearSearchResultsFn() {
+ vm.displayData = vm.files;
+ vm.searchValue = "";
+ }
+
+ function showCreateFolderDialog() {
+ $uibModal.open({
+ templateUrl: 'app/main/apps/file-manager/dialogs/create-rename-dialog/create-rename-dialog.html',
+ controller: 'CreateRenameDialogController',
+ controllerAs: 'vm',
+ size: 'sm',
+ resolve: {
+ CurrentEntry: null,
+ FileId: vm.files[vm.files.length-1].id + 1
+ }
+ }).result.then(function (newFolder) {
+ vm.files.push(newFolder);
+ console.log("resolve", arguments);
+ }, function () {
+ console.log("reject")
+ });
+ }
+
+ function showRenameFolderDialog(renameTarget) {
+ $uibModal.open({
+ templateUrl: 'app/main/apps/file-manager/dialogs/create-rename-dialog/create-rename-dialog.html',
+ controller: 'CreateRenameDialogController',
+ controllerAs: 'vm',
+ size: 'sm',
+ resolve: {
+ CurrentEntry: function () {
+ return {name: renameTarget.name};
+ },
+ FileId: vm.selectedFile.id
+ }
+ }).result.then(function (newName) {
+ vm.selectedFile.name = newName.name;
+ console.log("resolve", arguments);
+ }, function () {
+ console.log("reject")
+ });
+ }
+
+ function showManageTagsDialog() {
+ $uibModal.open({
+ templateUrl: 'app/main/apps/file-manager/dialogs/manage-tags-dialog/manage-tags-dialog.html',
+ controller: 'ManageTagsController',
+ controllerAs: 'vm',
+ size: 'sm',
+ resolve: {
+ CurrentTags: function () {
+ return vm.selectedFile.tags;
+ }
+ }
+ }).result.then(function (tags) {
+ vm.selectedFile.tags = tags;
+ console.log("resolve", arguments);
+ }, function () {
+ console.log("reject")
+ });
+ }
+
+ function showPreviewFileDialog(file) {
+ if (vm.canPreview.indexOf(file.type) != -1) {
+ $uibModal.open({
+ templateUrl: 'app/main/apps/file-manager/dialogs/preview-file/preview-file.html',
+ controller: 'PreviewFileController',
+ controllerAs: 'vm',
+ size: 'md',
+ resolve: {
+ CurrentEntry: function () {
+ return file;
+ }
+ }
+ });
+ } else {
+ window.alert("not a valid type");
+ }
+ }
+
+ function showDeleteDialog(file) {
+ $uibModal.open({
+ templateUrl: 'app/main/apps/file-manager/dialogs/delete-dialog/delete-dialog.html',
+ controller: 'DeleteDialogController',
+ controllerAs: 'vm',
+ size: 'md',
+ resolve: {
+ CurrentEntry: vm.selectedFile
+ }
+ }).result.then(function (newFolder) {
+ vm.files.splice(file.id,1);
+ for(var i = 0; i < vm.files.length; i++){
+ vm.files[i].id = i; //ID UPDATE
+ }
+ console.log("resolve", arguments);
+ }, function () {
+ console.log("reject")
+ });
+ }
+
+ function toggleFileManagerAside(id) {
+ omAside.toggle(id);
+ }
+
+ function changeDirectory(crumb) {
+ vm.breadcrumbs = vm.breadcrumbs.slice(0, vm.breadcrumbs.indexOf(crumb)+1);
+ }
+
+ function switchDirectory(switchTo){
+ vm.files = switchTo.fileList;
+ vm.breadcrumbs = switchTo.breadcrumbs;
+ vm.toggleFileManagerAside('fileManagerAside');
+ }
+ }
+})();
diff --git a/src/app/main/apps/file-manager/file-manager.html b/src/app/main/apps/file-manager/file-manager.html
new file mode 100644
index 0000000..b74a0c6
--- /dev/null
+++ b/src/app/main/apps/file-manager/file-manager.html
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
{{vm.selectedFile.name}}
+
+
+ {{'FILE_MANAGER.VIEW.TYPE' | translate}}: |
+ {{vm.selectedFile.type}} |
+
+
+ {{'FILE_MANAGER.VIEW.OWNER' | translate}}: |
+ {{vm.selectedFile.owner}} |
+
+
+ {{'FILE_MANAGER.VIEW.SIZE' | translate}}: |
+ {{vm.selectedFile.size === '' ? '-': vm.selectedFile.size | bytes}} |
+
+
+ {{'FILE_MANAGER.VIEW.TAGS' | translate}}: |
+
+ {{tag}}
+ |
+
+
+ {{'FILE_MANAGER.VIEW.LAST_MODIFIED' | translate}}: |
+ {{vm.selectedFile.date | date:'HH:mm, dd/MM/yyyy'}} |
+
+
+
+
+
+
+
diff --git a/src/app/main/apps/file-manager/file-manager.less b/src/app/main/apps/file-manager/file-manager.less
new file mode 100644
index 0000000..9836d41
--- /dev/null
+++ b/src/app/main/apps/file-manager/file-manager.less
@@ -0,0 +1,135 @@
+#fileManager{
+ height:100%;
+ position: relative;
+ .top-menu{
+ height:100px;
+ width:100%;
+ padding:35px;
+ background-color: @brand-primary;
+ .menu{
+ &-left{
+ float:left;
+ color:white;
+ i{
+ font-size:20px;
+ margin: 5px;
+ }
+ ol.breadcrumb{
+ font-size: 20px;
+ display: inline-block;
+ background-color: transparent;
+ li{
+ outline: 0;
+ &:hover{
+ color: darken(white,25%);
+ }
+ }
+ }
+ }
+ &-right{
+ float:right;
+ user-select: none;
+ input{
+ color:black;
+ }
+ >div{
+ display: inline-block;
+ }
+ i{
+ font-size:20px;
+ margin: 5px;
+ color:white;
+ }
+ }
+ }
+ }
+ .main{
+ width: 100%;
+ height: calc(%(~"100% - %s", 100px));
+ .view{
+ width: 70%;
+ height: 100%;
+ overflow-y: scroll;
+ float: left;
+ .button-group-top{
+ padding:16px;
+ .btn-upload{
+ position: relative;
+ input{
+ position: absolute;
+ width:100%;
+ opacity: 0;
+ left:0;
+ right:0;
+ top:0;
+ bottom:0;
+ }
+ }
+ #filteredBy{
+ margin-bottom: 20px;
+ display: none;
+ }
+ }
+ .context-menu{
+ position: absolute;
+ .menu{
+ list-style-type: none;
+ margin:0;
+ padding:0;
+ width: 150px;
+ li{
+ height:30px;
+
+ }
+ }
+ }
+ }
+ .selected{
+ width: 30%;
+ height: 100%;
+ float: right;
+ background-color: #fdfdfd;
+ overflow-y: scroll;
+ .selected-description {
+ .title {
+ width:100%;
+ text-align: center;
+ }
+ table {
+ padding: 0 24px;
+ width: 100%;
+ text-align: left;
+ tr {
+ th, td {
+ padding: 16px 0;
+ }
+ th {
+ text-align: right;
+ padding-right: 10px;
+ }
+ td {
+ padding-left: 10px;
+ text-align: left;
+ white-space: normal;
+ .label{
+ display: inline-block;
+ margin-left: 5px;
+ }
+ }
+ }
+ }
+ }
+ .selected-image{
+ width:100%;
+ text-align: center;
+ img{
+ margin: 30px 10px;
+ }
+ i{
+ font-size: 48px;
+ padding: 50px 20px;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/file-manager.module.js b/src/app/main/apps/file-manager/file-manager.module.js
new file mode 100644
index 0000000..5fdb493
--- /dev/null
+++ b/src/app/main/apps/file-manager/file-manager.module.js
@@ -0,0 +1,83 @@
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.fileManager', [
+ 'pascalprecht.translate'
+ ])
+ .config(Config);
+
+ /** @ngInject */
+ function Config($stateProvider, $translateProvider, $translatePartialLoaderProvider, lobiNavigationServiceProvider) {
+
+ $translateProvider.useLoader('$translatePartialLoader', {
+ urlTemplate: '{part}/i18n/{lang}.json'
+ });
+ $translateProvider.preferredLanguage('en');
+ // $translateProvider.useSanitizeValueStrategy('sanitize');
+ // Translation
+ $translatePartialLoaderProvider.addPart('app/main/apps/file-manager');
+
+ $stateProvider
+ .state('app.fileManager', {
+ url: '/file-manager',
+ views: {
+ 'content@app': {
+ templateUrl: 'app/main/apps/file-manager/file-manager.html',
+ controller: 'FileManagerController as vm',
+ resolve: {
+ myFiles: function ($http) {
+ return $http.get('app/main/apps/file-manager/data/myFiles.json')
+ .then(function (response) {
+ return response.data;
+ }, function (error) {
+ return 'There was an error getting data' + error;
+ });
+ },
+ starredFiles: function ($http) {
+ return $http.get('app/main/apps/file-manager/data/starredFiles.json')
+ .then(function (response) {
+ return response.data;
+ }, function (error) {
+ return 'There was an error getting data' + error;
+ });
+ },
+ sharedFiles: function ($http) {
+ return $http.get('app/main/apps/file-manager/data/sharedFiles.json')
+ .then(function (response) {
+ return response.data;
+ }, function (error) {
+ return 'There was an error getting data' + error;
+ });
+ },
+ recentFiles: function ($http) {
+ return $http.get('app/main/apps/file-manager/data/recentFiles.json')
+ .then(function (response) {
+ return response.data;
+ }, function (error) {
+ return 'There was an error getting data' + error;
+ });
+ },
+ offlineFiles: function ($http) {
+ return $http.get('app/main/apps/file-manager/data/offlineFiles.json')
+ .then(function (response) {
+ return response.data;
+ }, function (error) {
+ return 'There was an error getting data' + error;
+ });
+ }
+ }
+ }
+ },
+ bodyClass: 'app-file-manager'
+ })
+ ;
+
+ lobiNavigationServiceProvider.saveItem('app.fileManager', {
+ text: 'File Manager',
+ state: 'app.fileManager',
+ weight: 1,
+ //icon: 'fa fa-table'
+ });
+ }
+})();
diff --git a/src/app/main/apps/file-manager/i18n/en.json b/src/app/main/apps/file-manager/i18n/en.json
new file mode 100644
index 0000000..1a1780a
--- /dev/null
+++ b/src/app/main/apps/file-manager/i18n/en.json
@@ -0,0 +1,81 @@
+{
+ "FILE_MANAGER": {
+ "GLOBAL": {
+ "MONTHS": "months",
+ "MONTH": "month",
+ "JANUARY": "January",
+ "FEBRUARY": "February",
+ "MARCH": "March",
+ "APRIL": "April",
+ "MAY": "May",
+ "JUNE": "June",
+ "JULE": "Jule",
+ "AUGUST": "August",
+ "SEPTEMBER": "September",
+ "OCTOBER": "October",
+ "NOVEMBER": "November",
+ "DECEMBER": "December",
+
+ "JAN": "Jan",
+ "FEB": "Feb",
+ "MAR": "Mar",
+ "APR": "Apr",
+ "JUN": "Jun",
+ "JUL": "Jul",
+ "AUG": "Aug",
+ "SEP": "Sep",
+ "OCT": "Oct",
+ "NOV": "Nov",
+ "DEC": "Dec",
+
+ "MONDAY": "Monday",
+ "TUESDAY": "Tuesday",
+ "WEDNESDAY": "Wednesday",
+ "THURSDAY": "Thursday",
+ "FRIDAY": "Friday",
+ "SATURDAY": "Saturday",
+ "SUNDAY": "Sunday",
+
+ "MON": "Mon",
+ "TUE": "Tue",
+ "WED": "Wed",
+ "THU": "Thu",
+ "FRI": "Fri",
+ "SAT": "Sat",
+ "SUN": "Sun"
+ },
+ "VIEW": {
+ "SEARCH": "Search",
+ "GRID_VIEW": "Grid View",
+ "LIST_VIEW": "List View",
+ "NAME": "Name",
+ "TYPE": "Type",
+ "OWNER": "Owner",
+ "SIZE": "Size",
+ "LAST_MODIFIED": "Last Modified",
+ "LOCATION": "Location",
+ "PERMISSIONS": "Permissions",
+ "TAGS": "Tags",
+ "MODIFIED": "Modified",
+ "OPENED": "Opened",
+ "CREATED": "Created",
+ "INFO": "Info",
+ "EDITED": "Edited"
+ },
+ "MENU" : {
+ "OPEN" : "Open",
+ "SHARE" : "Share",
+ "MANAGE_TAGS" : "Manage Tags",
+ "CUT" : "Cut",
+ "RENAME" : "Rename",
+ "CHANGE_OWNER" : "Change Owner",
+ "DELETE" : "Delete",
+ "VIEW" : "View",
+ "DOWNLOAD" : "Download",
+ "VERSIONS" : "Versions",
+ "UPLOAD_FILE" : "Upload File",
+ "UPLOAD_FOLDER" : "Upload Folder",
+ "CREATE_FOLDER" : "Create Folder"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/i18n/ka.json b/src/app/main/apps/file-manager/i18n/ka.json
new file mode 100644
index 0000000..3c3c2ef
--- /dev/null
+++ b/src/app/main/apps/file-manager/i18n/ka.json
@@ -0,0 +1,83 @@
+{
+ "FILE_MANAGER": {
+ "GLOBAL": {
+ "MONTHS": "თვის",
+ "MONTH": "თვის",
+ "JANUARY": "იანვარი",
+ "FEBRUARY": "თებერვალი",
+ "MARCH": "მარტი",
+ "APRIL": "აპრილი",
+ "MAY": "მაისი",
+ "JUNE": "ივნისი",
+ "JULE": "ივლისი",
+ "AUGUST": "აგვისტო",
+ "SEPTEMBER": "სექტემბერი",
+ "OCTOBER": "ოქტომბერი",
+ "NOVEMBER": "ნოემბერი",
+ "DECEMBER": "დეკემბერი",
+
+ "JAN": "იან",
+ "FEB": "თებ",
+ "MAR": "მარ",
+ "APR": "აპრ",
+ "MAY_G": "მაი",
+ "JUN": "ივნ",
+ "JUL": "ივლ",
+ "AUG": "აგვ",
+ "SEP": "სექ",
+ "OCT": "ოქტ",
+ "NOV": "ნოე",
+ "DEC": "დეკ",
+
+ "MONDAY": "ორშაბათი",
+ "TUESDAY": "სამშაბათი",
+ "WEDNESDAY": "ოთხშაბათი",
+ "THURSDAY": "ხუთშაბათი",
+ "FRIDAY": "პარასკევი",
+ "SATURDAY": "შაბათი",
+ "SUNDAY": "კვირა",
+
+ "MON": "ორშ",
+ "TUE": "სამ",
+ "WED": "ოთხ",
+ "THU": "ხუთ",
+ "FRI": "პარ",
+ "SAT": "შაბ",
+ "SUN": "კვი"
+ },
+
+ "VIEW": {
+ "SEARCH": "ძიება",
+ "GRID_VIEW": "ცხრილის ფორმატი",
+ "LIST_VIEW": "სიის ფომარტი",
+ "NAME": "სახელი",
+ "TYPE": "ტიპი",
+ "OWNER": "მფლობელი",
+ "SIZE": "ზომა",
+ "LAST_MODIFIED": "ბოლო ცვლილება",
+ "LOCATION": "ლოკაცია",
+ "PERMISSIONS": "უფლებები",
+ "TAGS": "თეგები",
+ "MODIFIED": "შეცვლილია",
+ "OPENED": "გახსნილია",
+ "CREATED": "შექმნილია",
+ "INFO": "ინფო",
+ "EDITED": "შეცვლილია"
+ },
+ "MENU" : {
+ "OPEN" : "გახსნა",
+ "SHARE" : "გაზიარება",
+ "MANAGE_TAGS" : "თეგების ორგანიზება",
+ "CUT" : "გადაადგილება",
+ "RENAME" : "სახელის შეცვლა",
+ "CHANGE_OWNER" : "მფლობელის შეცვლა",
+ "DELETE" : "წაშლა",
+ "VIEW" : "ნახვა",
+ "DOWNLOAD" : "გადმოწერა",
+ "VERSIONS" : "ვერსიები",
+ "UPLOAD_FILE" : "ფაილის ატვირთვა",
+ "UPLOAD_FOLDER" : "საქაღალდის ატვირთვა",
+ "CREATE_FOLDER" : "საქაღალდის შექმნა"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/side-menu.less b/src/app/main/apps/file-manager/side-menu.less
new file mode 100644
index 0000000..d987024
--- /dev/null
+++ b/src/app/main/apps/file-manager/side-menu.less
@@ -0,0 +1,62 @@
+.off-canvas__container {
+ height:100%;
+ position: relative;
+ overflow-y: hidden;
+}
+
+.off-canvas__nav {
+ border: 2px solid rgba(0,0,0,0.2);
+ background-color: white;
+ margin:0;
+ width: @fm-aside-width;
+ height: @fm-aside-height;
+ position: absolute;
+ z-index: 100;
+ opacity: 1;
+ transition: @fm-aside-transition;
+
+ .heading{
+ text-align: center;
+ font-size: 24px;
+ margin: 25px 12.5px;
+ }
+ .user-select{
+ margin: 25px 12.5px 25px 35px;
+ text-align: left;
+ #user-select {
+ text-decoration: none;
+ }
+ .user{
+ cursor: pointer;
+ }
+ }
+ .list-group{
+ margin: 25px 0;
+ a{
+ cursor: pointer;
+ border:0;
+ padding-left: 35px;
+ }
+ }
+}
+
+.nav-closed {
+ opacity:0;
+ margin-left:-@fm-aside-width;
+}
+.nav-closed-top{
+ opacity:0;
+ margin-top:-@fm-aside-height;
+}
+.nav-closed-right{
+ opacity:0;
+ margin-left:@fm-aside-width;
+}
+.nav-closed-bottom{
+ opacity:0;
+ margin-top:@fm-aside-height;
+}
+.nav-closed-left{
+ opacity:0;
+ margin-left:-@fm-aside-width;
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/variables.less b/src/app/main/apps/file-manager/variables.less
new file mode 100644
index 0000000..6177c3d
--- /dev/null
+++ b/src/app/main/apps/file-manager/variables.less
@@ -0,0 +1,6 @@
+@fm-aside-height: 100%;
+@fm-aside-width: 250px;
+@fm-aside-transition: 0.5s ease;
+
+@fm-grid-thumb-size: 72px;
+@fm-list-thumb-size: 27px;
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/view/grid.html b/src/app/main/apps/file-manager/view/grid.html
new file mode 100644
index 0000000..732a760
--- /dev/null
+++ b/src/app/main/apps/file-manager/view/grid.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+

+
+
+
{{file.name}}
+
{{file.size | bytes}}
+
{{file.type}}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/view/grid.less b/src/app/main/apps/file-manager/view/grid.less
new file mode 100644
index 0000000..dfb5162
--- /dev/null
+++ b/src/app/main/apps/file-manager/view/grid.less
@@ -0,0 +1,21 @@
+#fileManager {
+ .grid-view {
+ padding: 0 16px;
+ .files{
+ .thumbnail{
+ max-height: 168px;
+ text-align: center;
+ > img{
+ height: @fm-grid-thumb-size;
+ width: @fm-grid-thumb-size;
+ }
+ > i {
+ font-size: @fm-grid-thumb-size;;
+ }
+ .caption{
+ padding: 0;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/view/list-condensed.html b/src/app/main/apps/file-manager/view/list-condensed.html
new file mode 100644
index 0000000..d08688f
--- /dev/null
+++ b/src/app/main/apps/file-manager/view/list-condensed.html
@@ -0,0 +1,81 @@
+
+
+
+ |
+
+ {{'FILE_MANAGER.VIEW.NAME' | translate}}
+
+
+
+
+
+
+
+
+ |
+
+ {{'FILE_MANAGER.VIEW.TYPE' | translate}}
+
+
+
+
+
+
+
+
+ |
+
+ {{'FILE_MANAGER.VIEW.OWNER' | translate}}
+
+
+
+
+
+
+
+
+ |
+
+ {{'FILE_MANAGER.VIEW.SIZE' | translate}}
+
+
+
+
+
+
+
+
+ |
+
+ {{'FILE_MANAGER.VIEW.LAST_MODIFIED' | translate}}
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+ {{file.name}} |
+ {{file.type}} |
+ {{file.owner}} |
+ {{file.size | bytes}} |
+ {{file.date | date:'HH:mm, dd/MM/yyyy'}} |
+
+
+
\ No newline at end of file
diff --git a/src/app/main/apps/file-manager/view/list-condensed.less b/src/app/main/apps/file-manager/view/list-condensed.less
new file mode 100644
index 0000000..0cfb7ba
--- /dev/null
+++ b/src/app/main/apps/file-manager/view/list-condensed.less
@@ -0,0 +1,36 @@
+#fileManager{
+ .main{
+ .view{
+ .files {
+ width: 100%;
+ > thead {
+ > tr {
+ > th {
+ text-align: center;
+ outline: 0;
+ }
+ }
+ }
+ > tbody {
+ > tr {
+ outline: 0;
+ }
+ }
+ tr {
+ td{
+ > img{
+ height: @fm-list-thumb-size;
+ width: @fm-list-thumb-size;
+ }
+ > i {
+ font-size: @fm-list-thumb-size;
+ }
+ }
+ }
+ td {
+ vertical-align: middle;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/toolbar/toolbar.controller.js b/src/app/toolbar/toolbar.controller.js
index d057116..ea23243 100644
--- a/src/app/toolbar/toolbar.controller.js
+++ b/src/app/toolbar/toolbar.controller.js
@@ -9,7 +9,7 @@
.controller('ToolbarController', ToolbarController);
/** @ngInject */
- function ToolbarController($state, Auth, $translate) {
+ function ToolbarController($state, $rootScope, $translate) {
var vm = this;
// Data
@@ -63,7 +63,9 @@
function changeLanguage(lang) {
vm.selectedLanguage = lang;
// Change the language
- $translate.use(lang.code);
+ $translate.use(lang.code).then(function () {
+ $rootScope.$emit('App:languageChange', lang);
+ })
}
}
})();
diff --git a/test.txt/hello b/test.txt/hello
deleted file mode 100644
index d3918a8..0000000
--- a/test.txt/hello
+++ /dev/null
@@ -1,31 +0,0 @@
-(aaa () {
- 'use strict';
-
- angular
- .module('app.{{ModuleName}}', [])
- .config(Config);
-
- /** @ngInject */
- aaa Config($stateProvider, lobiNavigationServiceProvider) {
-
- $stateProvider
- .state('app.{{ModuleName}}', {
- url: '/{{ModuleName}}',
- views: {
- 'content@app': {
- templateUrl: 'app/{{ModulePath}}/{{ModuleName}}.html',
- controller: '{{ControllerName}} as vm'
- }
- },
- bodyClass: 'app-{{ModuleName}}'
- })
- ;
-
- lobiNavigationServiceProvider.saveItem('app.{{ModuleName}}', {
- text: '{{ModuleDisplayName}}',
- state: 'app.{{ModuleName}}',
- weight: 1
- // icon: 'fa fa-table'
- });
- }
-})();